TFS 如何知道 nuget? [英] How does TFS know about nuget?

查看:40
本文介绍了TFS 如何知道 nuget?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自这篇文章 -

但是,在某些情况下,实际上并不是一个人在做建筑,因此无法以这种方式提供同意.(甚至没有安装 Visual Studio.)典型的例子是构建服务器.在这种情况下,NuGet 还将查找名为 EnableNuGetPackageRestore 的环境变量.要在 Visual Studio 选项不实用的情况下启用包还原,请将此变量设置为 true."

TFS 怎么知道如何调用 nuget?我要安装nuget exe吗?

How does TFS even know how to call nuget? Do I install the nuget exe?

推荐答案

TFS 怎么知道如何调用 nuget?我要安装nuget exe吗?

How does TFS even know how to call nuget? Do I install the nuget exe?

不,您应该为解决方案启用包还原,这可以从解决方案资源管理器中解决方案文件的上下文菜单中完成.这会将名为 .nuget 的文件夹添加到您的解决方案中,您将在此文件夹中找到 NuGet.exe.

No, you should enable package restore for the solution which can be done from the context menu for the solution file in the solution explorer. This will add a folder named .nuget to your solution and in this folder you will find NuGet.exe.

如果您将解决方案添加到源代码管理并在构建服务器上构建它,NuGet msbuild 目标将使用 NuGet.exe 可执行文件从 NuGet 恢复包作为构建的一部分.

If you add the solution to source control and build it on a build server the NuGet.exe executable will be used by the NuGet msbuild targets to restore packages from NuGet as part of the build.

因此您无需在构建服务器上安装 NuGet - 它成为您项目的一部分并置于版本控制之下.

So you do not need to install NuGet on the build server - it becomes part of your project and is placed under version control.

这篇关于TFS 如何知道 nuget?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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