问题描述
我无法尝试使用 aspnet-codegenerator 生成脚手架:
-
使用以下命令创建一个ASP.Net RazorPages应用程序
dotnet new webapp
-
有一个
dotnet build
-
使用
安装的dotnet-aspnet-codegeneratordotnet tool install --global dotnet-aspnet-codegenerator --version 3.1.4
-
冉
dotnet aspnet-codegenerator --help
它表示:该项目中没有代码生成器。将 Microsoft.VisualStudio.Web.CodeGeneration.Design 软件包作为NuGet软件包引用添加到项目中。
-
使用步骤
添加了第4步中提到的程序包dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
添加的包裹为:
<ItemGroup> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" /> </ItemGroup>
-
再次运行:
dotnet build
最后一步
-
冉
dotnet aspnet-codegenerator --help
再次说:该项目中没有代码生成器。将Microsoft.VisualStudio.Web.CodeGeneration.Design软件包作为NuGet软件包引用添加到项目中。
.Net核心安装版本:3.1.401
操作系统:Ubuntu 20.04
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)