NuSpec version attribute vs assembly version

后端 未结 2 1155
一整个雨季
一整个雨季 2021-02-03 21:21

When creating a nuget package, the version in the file name of the nuget package seems to come from the AssemblyInfo file in the web application project. I have also created a v

2条回答
  •  死守一世寂寞
    2021-02-03 21:48

    There doesn't need to be a relationship between the assembly version and the nuget package version. By convention, many maintainers use the same number for both.

    The convention for using the same number is also the nuget.exe default if you have no nuspec, or you use nuget.exe spec to create a tokenized nuspec file. However, if you replace the $version$ token with a value, then that value will take precendence and will be used in the package file name.

    You can also set the version on the command line, which takes precedence over all of the above.

    More info on Xavier's blog: NuGet $version$ token explained

提交回复
热议问题