What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

前端 未结 7 2165
离开以前
离开以前 2020-11-22 11:51

There are three assembly version attributes. What are differences? Is it ok if I use AssemblyVersion and ignore the rest?


MSDN says:

相关标签:
7条回答
  • 2020-11-22 12:25

    AssemblyInformationalVersion and AssemblyFileVersion are displayed when you view the "Version" information on a file through Windows Explorer by viewing the file properties. These attributes actually get compiled in to a VERSION_INFO resource that is created by the compiler.

    AssemblyInformationalVersion is the "Product version" value. AssemblyFileVersion is the "File version" value.

    The AssemblyVersion is specific to .NET assemblies and is used by the .NET assembly loader to know which version of an assembly to load/bind at runtime.

    Out of these, the only one that is absolutely required by .NET is the AssemblyVersion attribute. Unfortunately it can also cause the most problems when it changes indiscriminately, especially if you are strong naming your assemblies.

    0 讨论(0)
提交回复
热议问题