首页 > Web开发 > 详细

Package version is always 1.0.0 with dotnet pack

时间:2020-06-09 19:38:21      阅读:51      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!