Scaffolding error : deps.json doesn't exist

In my case, this error appeared after the VS update. Don't know why, but what I did:

  1. Go to your project folder and just remove the bin and obj folders.
  2. Rebuild your project.
  3. Add your new controller. It should work.

Perhaps it will help someone.


Found the answer here : https://github.com/dotnet/coreclr/issues/113

Apparently, this is some kind of bug that appeared on HP computers. I'll quote from the GitHub issue :

they have an environment variable called Platform, set to MCD which is why you are seeing this error.

This cause .NET Core to look for the file at MCD folder of your bin, instead of your normal Debug file. All you have to do is delete the variable or set it to nothing


The file VS 2017 is looking for in

[C:\Users\xxx\Documents\Visual Studio 2017\Projects\bin\MCD\Debug\netcoreapp1.1 [project name].deps.json]

seems to be found at

[C:\Users\xxx\Documents\Visual Studio 2017\Projects\bin\Debug\netcoreapp1.1 [project name].deps.json]

So I just copied the content from the second folder to the first and it worked. No need to change environment variables