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

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

    If you are using Mac (OS X) or any supported distribution of Linux, you have to run:

    dotnet tool install --global dotnet-aspnet-codegenerator --version 2.2.3
    

    Additionally, on Mac I added to my .zshrc (or bash equivalent)

    export PATH=$HOME/.dotnet/tools:$PATH
    

    And I had to make sure to restart Terminal.

提交回复
热议问题