I wanted Visual Studio to auto-increment the version number of my assembly for every build.
In AssemblyInfo.cs I changed this line to be:
[assembly: AssemblyVersion("1.0.0.*")]
but then my Assembly ProductVersion was "1.0.0.*"
How-I-fixed-it:
I commented out the line
//[assembly: AssemblyFileVersion("1.0.0.*")]
in AssemblyInfo.cs.
My version number was then like expected e.g. "1.0.0.123456" and was incremented every time i changed my code and re-built the project.
I found the right hints here: http://razorleaf.com/2010/01/auto-incrementing-visual-studio
Citing Paul Luc:
While it’s true that you can edit
assembly version information via the IDE, you must first remove the
AssemblyFileVersion attribute from the AssemblyInfo.cs file in order for
Visual Studio to apply auto-incrementing. Simply clearing the field
values for the assembly file version via the IDE will result in a
format-related exception.
This blog is about problems i encountered in everyday life and how i fixed them or worked around them. Sometimes i also just post things to let people out there know about something i think it might be of interest for others than me....
Showing posts with label AssemblyFileVersion. Show all posts
Showing posts with label AssemblyFileVersion. Show all posts
Subscribe to:
Posts (Atom)