So I downloaded Twitterizer from http://www.twitterizer.net/downloads/
I try to open it in Visual Studio and get all these nuget errors:
The imported project "C:\Twitterizer\.nuget\nuget.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file
exists on disk.
What is going on. How do I deal with this?
Should now be hunky-dory.
When i get the
nuget.targets not found
error i use the package manager touninstall-package
one of the packages in the project and then reinstall it usinginstall-package
. It seems like it regenerates the nugets.target file then.I know I'm late to the party but here is a really good tutorial on how to fix this issue. I used this to fix my project.
Nuget.target Fix
Just ran into the same problem, but in my case the issue was a space in the folder name:
Nuget was telling me it couldn't find "C:\git\My Path" but I was able to navigate to "C:\git\My%20Path". Removing the space in the foldername "fixed" the issue.
An alternative is to edit the .csproj file with a texteditor and remove or comment out the segment.
Easiest solution when you get this error in order to restore the missing
NuGet.targets
in Visual Studio Solution Explorer is to:this will download the missing files in the "
.nuget
" folder :)The above assumes you already have Nuget installed - if not follow the accepted answer above!
UPDATE: Please note for Visual Studio versions beyond 2013 the option is called "Restore NuGet Packages"