在 Visual Studio 2013 上启用 NuGet 包还原 [英] Enable NuGet Package Restore on Visual Studio 2013
问题描述
我正在按照这个简单教程开始使用 C# 中的 Google+ API 进行编码.但是,我在第 3 步上被困了几个小时,其中第一个子步骤是:
I'm following this easy tutorial to start coding with the Google+ API in C#. However, I've been stuck for hours on Step 3, where the first substeps are:
- 在 Visual Studio 中,单击项目">启用 NuGet 包还原"> 在对话框中回答是".
- 右键单击 gplus-quickstart-csharp 项目,然后选择管理 NuGet 包.
- 单击管理 NuGet 包"窗口上的恢复".这将安装 Google API 客户端库.
当我单击 Projet 时,没有启用 NuGet 包还原"选项.
When I click on Projet, there is no option "Enable NuGet Package Restore".
有管理 Nuget 包"选项,但没有恢复"按钮或任何选项.
There is a Manage Nuget Packages option, but no Restore button or option whatsoever.
该项目没有构建并给我错误:
The project doesn't build and gives me the error:
错误 1 此项目引用了缺少的 NuGet 包这台电脑.启用 NuGet 包还原以下载它们.为了更多信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105.丢失的文件是C:UsersDocumentsgoogle+gplus-quickstart-csharp.nugetNuGet.targets.C:UsersDocumentsgoogle+gplus-quickstart-csharpgplus-quickstart-csharpgplus-quickstart-csharp.csproj 201 5 gplus-quickstart-csharp
Error 1 This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is C:UsersDocumentsgoogle+gplus-quickstart-csharp.nugetNuGet.targets. C:UsersDocumentsgoogle+gplus-quickstart-csharpgplus-quickstart-csharpgplus-quickstart-csharp.csproj 201 5 gplus-quickstart-csharp
我访问了 microsoft 网站,它只重定向到 NuGet 文档,在那里我没有找到任何有效的内容.我尝试了以下命令(在示例中描述):
I went on the microsoft website and it only redirects to the NuGet documentation where I didn't find anything that works. I tried the following commands (described in the examples):
- D:projectscontoso> nuget.exe 恢复
- D:projectscontoso> nuget.exe 还原 contoso.sln
- D:projects> nuget.exe 还原 contoso
但无济于事.是的,NuGet 已安装.有任何想法吗?谢谢!
but to no avail. And yes, NuGet is installed. Any ideas? Thanks!
推荐答案
要找到菜单项:启用 nuget 包还原"在解决方案资源管理器中右键单击解决方案 - 而不是项目.
To find the menu item: "enable nuget package restore" right-click in the solution explorer on the solution - not on the project.
您收到一条消息:
是否要配置此解决方案以在构建期间下载和恢复丢失的 NuGet 包?
Do you want to configure this solution to download and restore missing NuGet packages during build?
这不是你要找的吗?
这篇关于在 Visual Studio 2013 上启用 NuGet 包还原的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!