Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   Increment Version Doesn't Work for Link Files (https://www.kinook.com/Forum/showthread.php?t=862)

dprice 02-03-2005 02:53 PM

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

kinook 02-04-2005 07:43 AM

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

dprice 02-07-2005 02:19 PM

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

kinook 02-07-2005 03:05 PM

http://www.kinook.com/Forum/showthread.php?threadid=849

dprice 02-07-2005 03:14 PM

Got it - thanks!
Derek


All times are GMT -5. The time now is 10:01 AM.


Copyright © 1999-2023 Kinook Software, Inc.