Ilya Chernomordik
Ilya Chernomordik

Reputation: 30335

Dnu restore is required for any work with reference in Visual Studio 2015 Update 1

I have created a new ASP.NET 5 project in latest Visual Studio. When I try to add a reference to either my project, nuget or even edit project.json file I always get an error that says I have to run "dnu restore" manually because of some issues with project.lock.json file that wasn't automatically updated. Dnu restore does indeed help, but it's clearly a bug in Visual Studio. Any way to fix it?

Upvotes: 0

Views: 145

Answers (1)

danludwig
danludwig

Reputation: 47375

A couple of things to check...

First of all, keep your project.lock.json file out of source control. dnu restore will regenerate it often.

Secondly, double-check your user environment variables. Make sure the following is in your Path:

C:\Users\<YourUserName>\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-final\bin

I have VS2015 Update1 RTM installed, and do not experience this, so I doubt it is a bug. If none of the above helps though, it may be an installation misconfiguration of your VS. Perhaps try it on another machine (or VM) if you can.

Upvotes: 1

Related Questions