Have you tried using the MSBuild FileUpdate task?

 

                <Target Name="Version">          

                                <FileUpdate

                                                Files="$(SolutionInfoFile)"

 
Regex="(?&lt;ver&gt;assembly: AssemblyVersion\(&quot;).*&quot;"

                                                ReplacementText="assembly:
AssemblyVersion(&quot;$(VersionNumber)&quot;" />

                                <FileUpdate

                                                Files="$(SolutionInfoFile)"

 
Regex="(?&lt;ver&gt;assembly: AssemblyFileVersion\(&quot;).*&quot;"

                                                ReplacementText="assembly:
AssemblyFileVersion(&quot;$(VersionNumber)&quot;" />

                </Target>

 

I generally use one file for all of the versioning. See here for more info
http://weblogs.asp.net/israelio/archive/2007/01/16/same-assembly-version-for
-all-project.aspx

 

------------

Michael Lyons

 

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Ian Thomas
Sent: Friday, 18 March 2011 1:45 PM
To: 'ozDotNet'
Subject: VS version increment problems

 

What do you guys use for VS2008 version increments? 

I have tried a Codeplex utility (Build version Increment v2.4) but it gives
me an odd Error, only on a Debug compilation (Build is OK), and only for the
\bin\release\ - as below. Strangely, the \Debug\ compile works and the
application runs as usual. 

Error (x 2) - Failed to locate attribute   "AssemblyFileVersion" //
"AssemblyVersion"   in file "D:\...\bin\Release\test.exe"

I'm not on top of getting sensible build increments from VS's inbuilt
Assembly Information (eg, unchanging File version). Obviously I need some
tutoring - can someone point me to a page on MSDN? 

  _____  

Ian Thomas
Victoria Park, Western Australia

Reply via email to