Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-03-2005, 02:53 PM
dprice dprice is online now
Registered User
 
Join Date: 01-19-2005
Posts: 13
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
Reply With Quote
  #2  
Old 02-04-2005, 07:43 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,752
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
Reply With Quote
  #3  
Old 02-07-2005, 02:19 PM
dprice dprice is online now
Registered User
 
Join Date: 01-19-2005
Posts: 13
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
Reply With Quote
  #4  
Old 02-07-2005, 03:05 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,752
http://www.kinook.com/Forum/showthread.php?threadid=849
Reply With Quote
  #5  
Old 02-07-2005, 03:14 PM
dprice dprice is online now
Registered User
 
Join Date: 01-19-2005
Posts: 13
Got it - thanks!
Derek
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



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


Copyright 1999-2019 Kinook Software, Inc.