我已经在我的 MVC Web 应用程序项目中包含了 AspNetCore.Identity,但是模型和视图文件不会自动构建脚手架。在 Visual Studio for Windows 中,脚手架标识的选项位于上下文菜单中,通过“添加 > 新建脚手架项”。Visual Studio 2019 for Mac 中是否有类似的脚手架选项?
我已经找到了如何使用终端脚手架身份文件的信息在这里不过,我的问题是关于如果Visual Studio for Mac可以具有在UI这种能力。
有几个解决方案:
(1)技巧:在Windows上使用Visual Studio,然后脚手架。然后复制到 macOS 电脑。这是简单的方法。
(2)在 macOS 电脑上,安装工具
dotnet tool install -g dotnet-aspnet-codegenerator
然后生成脚手架文件
dotnet aspnet-codegenerator identity -h
参考文档:https : //docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-3.1&tabs=netcore-cli#scaffold-identity-into-an-empty-项目
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句