I\'ve tried every package I could possibly find and none of them will install in my project. I\'ve installed every update listed in the Extensions and Updates list that wer
In my case, This problem was caused by a mismatch in my Target framework setting under each project. When I created a new project, VS 2015 defaulted to 4.5.2, however all my nuget packages were built for 4.6.
For some reason, VS 2015 was not showing me these errors. I didn't see them until I created a new empty project and tried to add my nuget project there. This behavior may have been aggravated because I had renamed the project a few times during the initial setup.
I solved the problem by
I am using Visual Studio 2015 Update 3 and I managed to reproduce this error (despite Update 3 allegedly containing a fix).
As suggested above, a reliable fix is to do the following... 1) Exit Visual Studio, 2) Delete the packages folder, 3) Restart VS.
But... if you don't want to immediately exit VS for some reason, I was still able to add/remove packages from all projects by choosing the 'Manage NuGet Packages for Solution' option, rather than the individual Project with the issue.
In general closing and re-open VS 2015 fixed most problems I have ran across. Once I did need to run a repair on one of my computers.
However I was about to do this Closing and re-opening VS2015 resolved the issue for me
I figured that I would instead right click on the project and Unload Project then right click and Reload project THEN Manage Nuget worked!
In my case updating Microsoft.CodeDom.Providers.DotNetCompilerPlatform
and Microsoft.Net.Compilers
caused the problem.
Deleting bin
, obj
, and packages
folders and restarting Visual Studio 2015 solved the problem for me.
My guess is Nuget Package Manager is messing up with VSO. I create a new project, add packages to it just fine, check in TFS. Then I go home, "Get Latest Version", and Run, and fail because Nuget Package Manager doesn't restore my packages. Solution: on my home machine
Repairing Visual Studio 2015 seems to have resolved this issue for me. See this issue for NuGet in GitHub.