aspnet-codegenerator not listing code generators
See original GitHub issueNote: 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.
Steps to reproduce:
dotnet new mvc --auth Individual dotnet tool install --global dotnet-aspnet-codegenerator --version 3.1.4 dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design dotnet restore
dotnet aspnet-codegenerator
Expected behavior:
Usage: aspnet-codegenerator [arguments] [options]
Arguments:
generator Name of the generator. Check available generators below.
Options:
-p|--project Path to .csproj file in the project.
-n|--nuget-package-dir
-c|--configuration Configuration for the project (Possible values: Debug/ Release)
-tfm|--target-framework Target Framework to use. (Short folder name of the tfm. eg. net46)
-b|--build-base-path
--no-build
%list of code generators including controller,area, identity%
Actual behavior:
Usage: aspnet-codegenerator [arguments] [options]
Arguments:
generator Name of the generator. Check available generators below.
Options:
-p|--project Path to .csproj file in the project.
-n|--nuget-package-dir
-c|--configuration Configuration for the project (Possible values: Debug/ Release)
-tfm|--target-framework Target Framework to use. (Short folder name of the tfm. eg. net46)
-b|--build-base-path
--no-build
No code generators are available in this project.Add Microsoft.VisualStudio.Web.CodeGeneration.Design package to the project as a NuGet package reference.
Additional information about the project being scaffolded, such as:
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.401
Commit: 39d17847db
Runtime Environment:
OS Name: linuxmint
OS Version: 19.3
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/3.1.401/
Host (useful for support):
Version: 3.1.7
Commit: fcfdef8d6b
.NET Core SDKs installed:
3.1.401 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
dotnet tool list -g
Package Id Version Commands
-------------------------------------------------------------------------
dotnet-aspnet-codegenerator 3.1.4 dotnet-aspnet-codegenerator
dotnet-ef 3.1.5 dotnet-ef
dotnet-user-secrets 2.2.0 dotnet-user-secrets
cat webistar.csprog
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UserSecretsId>1234retfsdbdffsdfsfsdfsfsfB</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" />
</ItemGroup>
</Project>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
aspnet-codegenerator: No code generators available ...
It says: No code generators are available in this project.Add Microsoft.VisualStudio.Web.CodeGeneration.Design package to the project as a NuGet ...
Read more >dotnet aspnet-codegenerator command
Specifies the path of the project file to run (folder name or full path). If not specified, it defaults to the current directory....
Read more >how to write custom template in aspnet code generator?
By default, the code generators template is in this folder - %USERPROFILE%\.nuget\packages\microsoft.visualstudio.web.codegenerators.mvc\6.0.6\ ...
Read more >dotnet-aspnet-codegenerator 7.0.9
Version Downloads Last updated
8.0.0‑preview.7.23408.2 99 6 days ago
8.0.0‑preview.6.23360.4 839 a month ago
8.0.0‑preview.5.23313.2 181 2 months ago
Read more >There Was An Error Running The Selected Code Generator
There Was An Error Running The Selected Code Generator In this video, ... Recommended Courses ➤ Asp.Net Core MVC: https://bit.ly/3S4Ec5B ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
per #1393, i am using this work around
Maybe #1393 ?