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,
I can get the Assembly Version with the following line of code: Version version = Assembly. GetEntryAssembly(). GetName().
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".
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.
You can set the assembly version using the AssemblyVersionAttribute. Assembly attributes are usually applied in the AssemblyInfo.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With