Nuget - 在构建期间看不到允许 nuget 下载丢失的包 [英] Nuget - Don't see allow nuget to download missing packages during build

查看:15
本文介绍了Nuget - 在构建期间看不到允许 nuget 下载丢失的包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一条消息,内容如下:

I get a message saying the following:

错误 1 ​​默认情况下禁用包还原.要表示同意,请打开Visual Studio 选项对话框,单击包管理器节点,然后选中允许 NuGet 在构建期间下载丢失的包."你可以也通过设置环境变量来表示同意'EnableNuGetPackageRestore' 为'true'.

Error 1 Package restore is disabled by default. To give consent, open the Visual Studio Options dialog, click on Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'.

当我转到工具 -> 选项时,我没有看到包管理器,在下面我看到包源和最近的包.我没有看到任何地方可以设置允许 Nuget 在构建期间下载丢失的包.

When I go to Tools -> Options, I do not see Package Manager and underneath I see Package Sources and Recent Packages. I do not see anywhere where I can set Allow Nuget to download missing packages during build though.

推荐答案

NuGet Package Manager 1.8 中添加了在 UI 中给予同意的选项.它是工具-> 选项-> 包管理器-> 常规下的第 3 项:包还原:允许 NuGet 在构建期间下载丢失的包".

The option to give consent in the UI has been added with NuGet Package Manager 1.8. It's the 3rd item under Tools-> Options-> Package Manager-> General : "Package Restore : Allow NuGet to download missing packages during build".

请确保 NuGet 在工具->扩展管理器中是最新的.

Please make sure NuGet is up-to-date in Tools->Extension Manager.

或者,您可以通过将 EnableNuGetPackageRestore 环境变量设置为 true 来表示同意.

Alternatively you can give consent by setting the EnableNuGetPackageRestore Environment variable to true.

这篇关于Nuget - 在构建期间看不到允许 nuget 下载丢失的包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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