Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the AssemblyFileVersion used for in C#?

In the assemblyInfo.cs I have AssemblyVersion and AssemblyFileVersion.

Normally I just increment the AssemblyVersion like this. 1st digit: Major change 2nd digit: Minor change 3rd digit: bug fixes 4rd digit: Subversion revision number

However, I am wondering what is the AssemblyFileVersion for, and when do I need to increment. Should it be the same as the assemblyVersion?

Should I just comment it out, if I am not using it?

Many thanks for any advice,

like image 900
ant2009 Avatar asked Aug 20 '09 04:08

ant2009


People also ask

How do I get AssemblyFileVersion?

I can get the Assembly Version with the following line of code: Version version = Assembly. GetEntryAssembly(). GetName().

What is assembly versioning explain with example?

Assembly informational version For example, an informational version could be "Common Language Runtime version 1.0" or "NET Control SP 2". On the Version tab of the file properties dialog in Microsoft Windows, this information appears in the item "Product Version".

What is the difference between file version and product version?

There is one more difference between those two: In file version, you're allowed to use only integers equal or larger than 0 in version parts. In product version you're allowed to use any text, it will produce warning, if it won't resolve to numbers, but that warning according to msdn is harmless.

Where do I put assembly version?

You can set the assembly version using the AssemblyVersionAttribute. Assembly attributes are usually applied in the AssemblyInfo.


1 Answers

AssemblyVersion is used by the .NET class loader and identifies the .NET version of the assembly. AssemblyFileVersion represents the File Version contained in a standard VERSION_INFO block of a Windows PE file...in other words, it represents the file version as seen in the file properties dialog.

If you omit the AssemblyFileVersion, the compiler will default it to be the same as the AssemblyVersion.

like image 96
Scott Dorman Avatar answered Oct 02 '22 19:10

Scott Dorman