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 were available. When I attempt to install SendGrid for example, this is the result (as is the result with all other packages):
Attempting to gather dependencies information for package 'Sendgrid.6.1.0' with respect to project 'UI\MyApplication.MVC', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Sendgrid.6.1.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Sendgrid.6.1.0'
Resolved actions to install package 'Sendgrid.6.1.0'
For adding package 'SendGrid.SmtpApi.1.3.1' to project 'MyApplication.MVC' that targets 'net452'.
For adding package 'SendGrid.SmtpApi.1.3.1' to project 'MyApplication.MVC' that targets 'net452'.
Adding package 'SendGrid.SmtpApi.1.3.1' to folder 'C:\Users\Keith\Source\Workspaces\MyApplication\MyApplication.MVC\packages'
Install failed. Rolling back...
I can't be the only one on the planet having issue with Visual Studio 2015 and the new and "improved" NuGet Package Manager.
UPDATE:
Well, must be something odd in my solution because I created a new project from the VS2015 template (web) and the packages install just fine. When I find out the issue, I'll post the resolution in the event others run into the same problem.
UPDATE 2:
Ok, it's not our solution. We created a new solution from scratch again (this has wasted a lot of our development time might I add), added a couple of packages (Identity, EF, SendGrid) and after checking the solution in to VSO, another developer performs a fresh creation of the branch and build errors occur. When I go to the NuGet packages for an individual project, it acts as though none of the packages I have added are available. Anyone else experiencing this?
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.
Closing and re-opening VS2015 resolves the issue.
It seems that in some cases, simply reloading the affected project will work.
I found a solution for this in my case, try to update the NuGet Package Manager.
To do this:
This let me install packages without problem again.
Hope this helps!
In my case updating
Microsoft.CodeDom.Providers.DotNetCompilerPlatform
andMicrosoft.Net.Compilers
caused the problem.Deleting
bin
,obj
, andpackages
folders and restarting Visual Studio 2015 solved the problem for me.I was able to resolve this issue by reinstalling Nuget Package Manager via Tools -> Extensions and Updates
Just to help out anyone who has landed on this page after updating VS2015 to update 2 and trying to manage packages on a website, receiving the "NuGet configuration file is invalid" error, this is a known and acknowledged issue:
https://connect.microsoft.com/VisualStudio/feedback/details/2698136/nuget-configuration-is-invalid-manage-nuget-packages-for-solution-disabled
I got mine working again by installing package manager 3.4.4 (beta) from http://dist.nuget.org/index.html
They do also state update 3 for Visual Studio will also contain a fix