简体   繁体   English

增加Nuget包版本NetStandard本地文件夹视觉工作室2017

[英]Increment Nuget Package Version NetStandard Local Folder visual studio 2017

I have a bunch of utilities that I have created for internal use, using Net Standard. 我有一堆使用Net Standard创建供内部使用的实用程序。

Under Project Properties->Package I have set "Generate Nuget Packages on build" .csproj, in which I have added: 在Project Properties-> Package下,我设置了“在构建时生成Nuget包”.csproj,我在其中添加了:

<PropertyGroup>
<PackageOutputPath>MyDirPath</PackageOutputPath>
</PropertyGroup>

This all works well and good, and it creates MyInternalPackage.1.0.0.nupkg in the correct folder. 这一切都运行良好,并在正确的文件夹中创建MyInternalPackage.1.0.0.nupkg。

I want to know how I can auto increment the version number, when I build/rebuild my Net Standard Project. 我想知道在构建/重建我的Net Standard Project时如何自动增加版本号。

Over to you. 给你。

You can add a property called AppxAutoIncrementPackageRevision and set the value to True: 您可以添加名为AppxAutoIncrementPackageRevision的属性并将值设置为True:

Full code is below: 完整代码如下:

<PropertyGroup>
    <PackageOutputPath>MyDirPath</PackageOutputPath>
    <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
</PropertyGroup>

Once you build, this will auto increment. 一旦你建立,这将自动增加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM