PDA

View Full Version : Set text file\product version for a VS.NET project


teognost
06-04-2007, 01:13 PM
I have a 'Make VS.NET' step that is compiling a C# project,checkbox 'set proj version to a specific value' is ticked,all the 3 checkboxes with set version are ticked as well(file\assembly\product version).

I want to set the project version to a specific value but to have different assembly version (only numeric like '1.2.3.4') than file version (should be like '1.2.3.4 Release1') and product version (should be like '1.2 Release1').
As first attempt I wanted to set everything to '1.2.3.4 Release1' but the project compilation fails:

AssemblyInfo.cs(29,12): error CS0647: Error emitting 'System.Reflection.AssemblyVersionAttribute' attribute -- 'The version specified '1.2.3.4 Release1' is invalid'

So question 1 is -how can I set version using chars as well,not only numbers?
And 2-how can I set different file version than assembly and product version?
Thanks a lot for any help!

kinook
06-04-2007, 01:41 PM
Originally posted by teognost
So question 1 is -how can I set version using chars as well,not only numbers?
VS.NET requires the version values to be in the form 9.9.9.9.

And 2-how can I set different file version than assembly and product version?

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

teognost
06-05-2007, 04:27 AM
thanks for answers.
regarding 1->right now I am replacing a NANT build with my VisualBuild system.
Assemblies produced by the NANT build had the file\product version with text (1.2.3.4 Release1).I am not sure how,I will check it,maybe some special steps were performed after the compilation.
Idea is somehow this was possible,I need to figure out how.

kinook
06-05-2007, 06:47 AM
The error is reported by the C# compiler, which I would imagine NANT also uses. I'm not aware of any flags that would cause it to accept non-standard version strings.