What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

前端 未结 7 2162
离开以前
离开以前 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:21

    AssemblyVersion pretty much stays internal to .NET, while AssemblyFileVersion is what Windows sees. If you go to the properties of an assembly sitting in a directory and switch to the version tab, the AssemblyFileVersion is what you'll see up top. If you sort files by version, this is what's used by Explorer.

    The AssemblyInformationalVersion maps to the "Product Version" and is meant to be purely "human-used".

    AssemblyVersion is certainly the most important, but I wouldn't skip AssemblyFileVersion, either. If you don't provide AssemblyInformationalVersion, the compiler adds it for you by stripping off the "revision" piece of your version number and leaving the major.minor.build.

提交回复
热议问题