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

后端 未结 13 2280
佛祖请我去吃肉
佛祖请我去吃肉 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 02:59

    Just add tag 'DotNetCliToolReference ' and package code design on .csproj and execute code-generate command on root solution. Thats worked to me.

    .csproj

    ...

    Command PS C:\Users\miche\projetos\asp_net_core\crud> dotnet aspnet-codegenerator controller -name ProdutosController -m Produto -dc AppDataContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries

    Don't forget to build and restore solution after add package ;)

提交回复
热议问题