VS 2017 Create a Controller RRS feed

  • Question

  • User1826113580 posted

    I installed RTM VS 2017 and created a project:

    Template: ASP.NET Core Web Application (.Net Core)
    ASP.NET Core 1.1 Templates:Web Application
    Right Click Controller, Add, Controller and select Full Dependency
    Right Click Controller, Add, Controller, and select MVC Controller Empty
    Click Add, Add (scaffolding now runs)
    I get this error: There was an error running the selected code generator: The specified deps.json [.....bin\HPD\Debug\netcoreapp1.1\myApp.deps.json] does not exist.

    I reinstalled VS 2017 just in case I had some kind of corruption but get the same error. I tried manually adding an empty deps.json in the indicated location but that just leads to a different error because the file is empty.

    It would seem that the Full Dependency action should have provided any necessary files. However, do I need to do something to have this file generated before scaffolding will work?

    EDIT once I ran dotnet restore and ef migrations add initial, then scaffolding worked.

    Tuesday, March 14, 2017 5:31 PM

All replies

  • User-491950272 posted

    Hi Dave,

    Probably your .NET Core of your VS and the SDK installed don't match. I confronted these issues but deleting a project and creating an entirely new solves the problem. Go to the website and make sure that your application's runtime and installed version of .NET Core SDK matches (Unless it is the newest one).

    Tuesday, March 21, 2017 5:42 AM