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:
When I click on Projet, there is no option "Enable NuGet Package Restore".
There is a Manage Nuget Packages option, but no Restore button or option whatsoever.
The project doesn't build and gives me the error:
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:\Users\Documents\google+\gplus-quickstart-csharp\.nuget\NuGet.targets. C:\Users\Documents\google+\gplus-quickstart-csharp\gplus-quickstart-csharp\gplus-quickstart-csharp.csproj 201 5 gplus-quickstart-csharp
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):
but to no avail. And yes, NuGet is installed. Any ideas? Thanks!
Add The NuGet Package to you ProjectRight-click on the project's References and click Manage NuGet Packages. In the NuGet Package Manager, select online from the menu and search “New NuGet Package” and click Install.
To find the menu item: "enable nuget package restore" right-click in the solution explorer on the solution - not on the project.
You get a message:
Do you want to configure this solution to download and restore missing NuGet packages during build?
Wasn't that what you were looking for?
You don't want to use the project based nuget package restore!
Make sure you have the latest Nuget version (Tools -> Extensions and Updates)
When you go to build the project it should tell you it needs to download the nuget packages (or might just auto download them).
Edit not sure whats with the downvotes:
http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html
What the NuGet team is now recommending is both a lot cleaner and a lot simpler. In short, you don't do anything special, and it just happens! This is because NuGet now always restores packages before building in VS. So no changes whatsoever are needed on your files, which is beautiful!
Since people are still having issues editing to include more information:
https://docs.nuget.org/consume/package-restore#common-issues-with-automatic-package-restore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With