码迷,mamicode.com
首页 > Web开发 > 详细

Package version is always 1.0.0 with dotnet pack

时间:2020-06-09 18:51:22      阅读:77      评论:0      收藏:0      [点我收藏+]

标签:during   grid   lin   pull   you   ocs   tool   csp   too   

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

标签:during   grid   lin   pull   you   ocs   tool   csp   too   

原文地址:https://www.cnblogs.com/chucklu/p/13076079.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!