Reputation: 38537
I just created a new ASP.NET MVC 6 project and wanted to update the NuGet packages to their latest versions (The default project templates are usually very out of date). I noticed the following updates were possible:
When I try to upgrade these packages wither using the NuGet package dialog or updating the version numbers in the project.json file for Newtonsoft.json, I get errors.
1) Severity Code Description Project File Line Error Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL)) 0
2) Severity Code Description Project File Line Error NuGet Package Restore failed for one or more packages. See details in the Output window. Mvc6ProjectName C:[PATH TO MY FOLDER]\Source\Mvc6ProjectName\project.json 0
3) Severity Code Description Project File Line Error Dependency Newtonsoft.Json >= 6.0.8 could not be resolved Mvc6Boilerplate C:\Git\ASP.NET-MVC-Boilerplate\Source\MVC6\Mvc6Boilerplate\project.json 19
I also have a MVC project and am using the latest NuGet packages there so why can't I upgrade these packages? Is this to do with the fact that there is no more web.config file where we can specify runtime assemblyBinding's:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Update 1
When I try to update Newtonsoft.Json from the package manager console, I get the error below:
PM> Update-Package Newtonsoft.Json -ProjectName Mvc6Boilerplate -Version 6.0.8 Package with the Id 'Newtonsoft.Json' is not installed to project 'Mvc6Boilerplate'.
It seems that Newtonsoft.Json is not installed in the default MVC 6 project but is installed as a dependency of another project. This NuGet package is not actually displayed in the Nuget Package Manager either but is displayed in the project.json file and also under the References->DNX and DNX Core tree view item.
When I try to explicitly install the Newtonsoft.Json package, it does upgrade to 6.0.8 but I then get the errors I listed above.
Upvotes: 10
Views: 5753
Reputation: 11
It seems that the problem has been resolved. You have to update your NugetPackage Manager:
Tools > Extensions and Updates > Updates > Visual Studio Gallery
Upvotes: 0
Reputation: 30267
The easiest solution that I know of right now is to use Visual Studio 2013
instead of 2015
to upgrade your packages.
Upvotes: 0
Reputation: 121
This error: "Severity Code Description Project File Line Error NuGet Package Restore failed for one or more packages. See details in the Output window."
...was resolved for me by ensuring I was running VisualStudio as an Administrator.
Although, the page did not fully render well on the first build.
Upvotes: 2