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

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

问题描述

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



I知道AssemblyInfo.cs是在以下文件夹中动态创建的: obj / Debug / netcoreapp1.1 /



它不接受以下旧方法:
[assembly:System.Reflection.AssemblyFileVersionAttribute( 1.0.0。*)]



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



我的问题是,有没有人知道如何控制.NET Core(或相应的.NETStandard)项目中的版本。

解决方案

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



我找到了一个名为dotnet凹凸的项目,该项目适用于该项目。 json格式,但努力寻找.csproj格式的解决方案。 dotnet颠簸的作者实际上提出了.csproj格式的解决方案,它称为MSBump。



在GitHub上有一个项目可用于: p>

https://github.com/BalassaMarton/MSBump



,您也可以在Nuget上看到该代码及其可用代码。只需在Nuget上搜索MSBump。


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).

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

It does not accept the old method of: [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.*")]

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

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

解决方案

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

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 the the dotnet bump actually came up with the solution for the .csproj format and it is called MSBump.

There is a project on GitHub for it at:

https://github.com/BalassaMarton/MSBump

where you can see the code and its available on Nuget too. Just search for MSBump on Nuget.

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

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