No executables found matching command 'dotnet-aspnet-codegenerator'"

后端 未结 13 2322
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-15 02:16

When trying to add a Controller in an ASP.NET Core project using Visual Studio 15 Enterprise with Update 3, I get the error below:

\"The was an error running

13条回答
  •  渐次进展
    2020-12-15 03:00

    For VS 2015, in project.json file -

    under dependencies add -

    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
      "version": "1.0.0-preview2-final",
      "imports": [
        "portable-net45+win8"
      ]
    },
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.0.0-preview2-final"
    

    then under tools add-

    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
      "version": "1.0.0-preview2-final",
      "imports": [
        "portable-net45+win8"
      ]
    } 
    

提交回复
热议问题