Package version is always 1.0.0 with dotnet pack

Package version is always 1.0.0 with dotnet pack

https://github.com/kerryjiang/SuperSocket/blob/master/Directory.Build.props

 

When you use dotnet pack, the version is pulled from the project definition (previously project.json, now *.csproj), not AssemblyInfo.cs. So, your new workflow will be very similar to what it was with project.json.

From the project.json to csproj migration docs, you can use the VersionPrefix and VersionSuffix properties.

Before:

{
  "version": "1.0.0-alpha-*"
}

Now:

<PropertyGroup>
  <VersionPrefix>1.0.0</VersionPrefix>
  <VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>

You can also use the single Version property, but the docs warn that this "may override version settings during packaging".

<PropertyGroup>
  <Version>1.0.0-alpha</Version>
</PropertyGroup>

 

Package version is always 1.0.0 with dotnet pack

上一篇:js之数据类型(原始类型——数字,字符串,布尔值,空,undefiend,Symbol bigInt)


下一篇:Linux libcurl源码编译以及安装过程