Visual Studio 2017 (.NET Core) 中的自动版本控制 [英] Auto Versioning in Visual Studio 2017 (.NET Core)

查看:42
本文介绍了Visual Studio 2017 (.NET Core) 中的自动版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了几个小时的大部分时间试图找到一种在 .NETCoreApp 1.1 (Visual Studio 2017) 中自动递增版本的方法.

I have spent the better part of a few hours trying to find a way to auto-increment versions in a .NETCoreApp 1.1 (Visual Studio 2017).

我知道正在文件夹中动态创建 AssemblyInfo.cs:obj/Debug/netcoreapp1.1/

I know the the AssemblyInfo.cs is being created dynamically in the folder: obj/Debug/netcoreapp1.1/

它不接受旧方法:[程序集:System.Reflection.AssemblyFileVersionAttribute("1.0.0.*")]

如果我将项目设置为包,我可以在那里设置版本,但这似乎用于构建 AssemblyInfo.cs 文件.

If I set the project to package I can set versions there but this seems to be used to build the AssemblyInfo.cs file.

我的问题是,有没有人想出如何在 .NET Core(或 .NETStandard)项目中控制版本.

My question is, has anyone figured out how to control version in .NET Core (or .NETStandard for that matter) projects.

推荐答案

我一直在为 VS2017 中的 .NET Core 应用程序寻找一个使用 csproj 配置格式的版本增量器.

I have been looking for a version incrementer for a .NET Core app in VS2017 using the csproj configuration format.

我发现了一个名为 dotnet Bump 的项目,它适用于 project.json 格式,但很难找到适用于 .csproj 格式的解决方案..csproj 格式的解决方案实际上是 dotnet Bump 的作者提出的,称为 MSBump.

I found a project called dotnet bump that worked for the project.json format but struggled to find a solution for the .csproj format. The writer of dotnet bump actually came up with the solution for the .csproj format and it is called MSBump.

GitHub 上有一个项目位于:

There is a project on GitHub for it at:

https://github.com/BalassaMarton/MSBump

您可以在何处查看代码,并且 NuGet 上也提供了该代码.只需在 Nuget 上搜索 MSBump.

where you can see the code and it's available on NuGet too. Just search for MSBump on Nuget.

这篇关于Visual Studio 2017 (.NET Core) 中的自动版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆