![]() |
Restore read-only attribute for .rc or .vbp files after set version option
I use "Set the project version..." option in the Version tab for the VisualC and VisualBasic steps.
This feature deletes read-only flag for .rc (VC resource) or .vbp (VisualBasic project) file and set the version. The problem is that VisualBuild does not restore the read-only flag for these files. Is there any workaround for this bug? |
That behavior is by design. If the action modifies a file, it leaves it writeable so that it's clear that it has been modified. Typically, you would want to commit the version change to a source control system as part of the automated build, which would also usually set the file back to read-only when checked in / committed.
You can set the file(s) back to read-only manually if necessary via a Run Program step like (this can be copied/pasted into VBP): |
I can't agree with it.
If I want to commit the version change I have to check the file out before (and delete read-only attribute) and check it in after compilation. And I can't reset read-only attribute because I don't know if this file was writeable or no before (or I need to save the attribute before). In my case I don't want to commit version change to source control. In all cases it is dangerous to modify readonly attribute outside of source control system. Now I get situation when there is writeable checked in file. IMHO VBP must restore readonly (in other words - doesn't change readonly attribute). Thanks. |
This sounds like a user configuration option in an up comming version.
Even nicer would be a check box in the action's dialog |
So, can you add this CR for the next VBP release?
Thnx. |
All times are GMT -5. The time now is 08:43 AM. |
Copyright © 1999-2023 Kinook Software, Inc.