#1
|
|||
|
|||
Increment Version Doesn't Work for Link Files
We use a shared AssemblyInfo file in our solution for setting common assembly attributes like Assembly Version, Copyright info, etc. When using the option to have VBP increment the assembly version, it adds an assembly version attribute to all of the project AssemblyInfo.cs files in addition to the shared AssemblyInfo file. This causes a compile error since there are duplicate AssemblyVersion attributes set.
See the source code from the Microsoft Enterprise Library to see an example of this: http://msdn.microsoft.com/library/en...tml/entlib.asp We ended up using a few extra steps to automate this process, but it would be nice to just use the VS.NET increment option. Thanks, Derek |
#2
|
|||
|
|||
You can still use the Make VS.NET increment capability, just create a separate step to increment the version, specifying the shared AssemblyInfo.cs filename on the Project/Solution tab, then don't increment the version in the step that builds the solution. See the help for more details: http://www.visualbuild.com/Manual/?makevs_net.htm
|
#3
|
|||
|
|||
I tried what you suggested and it works - sort of. I created a Make VS.NET step. On the Projects/Solutions tab, I specified my shared assembly file, I checked "Don't build the projects..." and selected "All" for which config to build. When I test it, the assembly version is updated, but I get a build error:
--------------------Starting Build: 'MyBuild.bld'-------------------- Building project step 'Increment Shared Assembly Version Only'... incrementing version...Object reference not set to an instance of an object. Step 'Increment Shared Assembly Version Only' failed Build ended. If I check "Ignore step failure", then it updates the assembly version with no error, but I have no idea if anything else went wrong. What am I missing? Thanks! Derek |
#4
|
|||
|
|||
#5
|
|||
|
|||
Got it - thanks!
Derek |
|
|