Open ananthakrishnands opened 4 years ago
Hi, @ananthakrishnands, I would like to ask you some questions so maybe I can help you:
Did you add the Microsoft.VisualStudio.Web.CodeGeneration.Design
NuGet reference to your .csproj
file? Its line should look like this: "<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
"
Did you install the aspnet-codegenerator
tool? If not, you can install it before running the command you mentioned originally by entering this in your terminal: dotnet tool install -g dotnet-aspnet-codegenerator
Maybe this is related to #1393
Note: If filing an issue related to using Scaffolding within Microsoft Visual Studio, please file an issue on the Microsoft Developer Community instead of here. This can be accomplished from Visual Studio by clicking on Help > Send Feedback, and choosing the appropriate action.
I am not able to scaffold Identity using dotnet cli
Steps to reproduce:
In Visual Studio for Mac i couldn't find Identity tab when selecting Add-> New Sacffold item So i tried with dotnet cli and got the below error
Error Logs
Dileeps-MacBook-Air:WebApp1 ananthu$ dotnet aspnet-codegenerator identity -dc WebApp1.Data.ApplicationDbContext [Trace]: Command Line: identity -dc WebApp1.Data.ApplicationDbContext Building project ... [Trace]: Command Line: --no-dispatch --port-number 60589 identity -dc WebApp1.Data.ApplicationDbContext --dispatcher-version 3.1.0+378c45c0530b8154358dc22475bcb1beacde8d27 Finding the generator 'identity'... No code generators found with the name 'identity' at Microsoft.VisualStudio.Web.CodeGeneration.CodeGeneratorsLocator.GetCodeGenerator(String codeGeneratorName) at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args) RunTime 00:00:06.75
<--------------- WebApp1.csproj file ------------------->
<------------------------------------------------------->
<--------------- dotnet info ---------------------------->
.NET Core SDK (reflecting any global.json): Version: 3.1.401 Commit: 39d17847db
Runtime Environment: OS Name: Mac OS X OS Version: 10.13 OS Platform: Darwin RID: osx.10.13-x64 Base Path: /usr/local/share/dotnet/sdk/3.1.401/
Host (useful for support): Version: 3.1.7 Commit: fcfdef8d6b
.NET Core SDKs installed: 2.1.4 [/usr/local/share/dotnet/sdk] 3.0.101 [/usr/local/share/dotnet/sdk] 3.1.100 [/usr/local/share/dotnet/sdk] 3.1.200 [/usr/local/share/dotnet/sdk] 3.1.401 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.App 3.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.21 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
<------------------------------------------------------->
Expected behavior:
On running dotnet aspnet-codegenerator identity -dc WebApp3v.Data.ApplicationDbContext it should scaffold the Identity and generate the related pages
Actual behavior:
Error is seen
Additional information about the project being scaffolded, such as:
Target framework(s):
Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):
Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding: