Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly File Version not changing?

Tags:

I have in my assemblyinfo.cs class the code:

[assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyFileVersion("1.0.*")] 

Calling System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() works fine and gives the updated version, however, when i look at the generated dll in windows explorer, right click properties, click the 'details' tab, the fileversion says "1.0.0.0" even though the output above says 1.0.3489.17621 ?

like image 545
maxp Avatar asked Jul 21 '09 09:07

maxp


1 Answers

You cannot use 1.0.* to auto-increment the AssemblyFileVersion, only the AssemblyVersion. (Checked in all Visual Studio versions from 2005 to 2012).

Comment out the following line

[assembly: AssemblyFileVersion("1.0.*")]

and the File Version will take the same number as the Assembly Version.

like image 138
Patrick McDonald Avatar answered Sep 22 '22 06:09

Patrick McDonald