在VSTS中构建后,将NuGet软件包更新到最新版本 [英] Update NuGet package to last version after build in VSTS

查看:67
本文介绍了在VSTS中构建后,将NuGet软件包更新到最新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,请原谅我的英语.

first of all, excuse me for my English.

在VSTS(Visual Studio团队服务)中,我想为我的应用程序激活自动编译.在购买服务之前,我想知道我的案子是否可行.

In VSTS (visual studio team services), I want to activate automatic compilation for my application. Before I bought the services, I wanted to know if my case would work.

我有一个项目A,该项目依赖于项目B.每次上传对master的提交时,项目B都会创建一个NuGet包.

I have a project A that has a dependency on project B. Project B will create a NuGet package each time a commit to master is uploaded.

我希望您对项目A提交主提交,VSTS构建该项目,但是在此之前,将NuGet包依赖项从项目B升级到最新版本.

I want you to commit a master commit on project A, VSTS build the project, but before that upgrade the NuGet package dependency from project B to the latest version.

有可能吗?还是我必须做项目委员会b,更新项目A中的引用,然后上传项目A?

Would that be possible? Or do I have to do Project Committee b, update the reference in Project A, and then upload Project A?

非常感谢您.

推荐答案

如果使用的是Visual Studio 2017,请签出项目中的PackageReference标记.您可以在项目中直接使用它,而不是单独的packages.config文件.

If you are using Visual Studio 2017, check out the PackageReference tag in your project. You use this directly within your project, not a separate packages.config file.

https://docs .microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files

您可以使用浮动引用,该引用会触发自动使用的最新版本,例如

You can use a Floating reference that will trigger the latest version automatically being consumed, e.g.

<ItemGroup>
    <PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.*" />
</ItemGroup>

这篇关于在VSTS中构建后,将NuGet软件包更新到最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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