What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

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

    To keep this question current it is worth highlighting that AssemblyInformationalVersion is used by NuGet and reflects the package version including any pre-release suffix.

    For example an AssemblyVersion of 1.0.3.* packaged with the asp.net core dotnet-cli

    dotnet pack --version-suffix ci-7 src/MyProject
    

    Produces a package with version 1.0.3-ci-7 which you can inspect with reflection using:

    CustomAttributeExtensions.GetCustomAttribute(asm);
    

提交回复
热议问题