-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot generate controller from cli #1347
Comments
The problem appears to be caused by installing the latest dotnet core SDK 3.1.400-preview-015151 that comes with the latest VS 2019 16.7 Preview 2. Rolling back to SDK 3.1.300 appears to have fixed the issue. |
I seem to have hit the same problem. |
@AceHack this doesn't repo with the current released 3.1 SDK. Can you close this issue? |
Where is the place to file bugs on preview releases? |
Same place if it's the current preview version. |
It is the current preview version. |
I have looked at the issue it will be fixed in an upcoming servicing update(version 3.1.4) |
Is this by any chance the cause of the Visual Studio error "Import 'Microsoft.WebTools.Scaffolding.Core.ScaffolderFactory.FactoryConfigEvaluator' could not be satisfied." when trying to Scaffold Identity on a Blazor application? |
@BrunoBlanes I don't think so but I am seeing that error pop up for other users as well. I'm digging into what is causing it. Would you mind opening another issue here and I can get more info off of you. |
@deepchoudhery it is done as #1364 |
Fixed in 3.1.4. Closing. |
I wonder why this is closed, 3.1.4 is broken : #1387 . |
I am facing the same with .NET 5.0 and the package version 5.0.1. Any idea how to fix it? |
You can see your SDKs and runtimes installed with.
you can see your packages with
As for why this happened. No idea, Just downgrading my SDK, .NET core env and the package version worked for me. |
step 1 fixed it for me, sdk version 3.0 |
I fixed it updating the codegenator package:
|
Thank you! Now it is working.
From: Christian Figueredo <[email protected]>
Date: Saturday, 23 January 2021, 11:55 AM
To: dotnet/Scaffolding <[email protected]>
Cc: Guillermo Arturo Vitola Lacombe <[email protected]>, Comment <[email protected]>
Subject: Re: [dotnet/Scaffolding] Cannot generate controller from cli (#1347)
I fixed it updating the codegenator package:
* unistall codegenerator:
dotnet tool uninstall --global dotnet-aspnet-codegenerator
* install codegenerator (use your sdk version)
dotnet tool install --global dotnet-aspnet-codegenerator --version 3.1.4
* Restore
dotnet restore
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1347 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQBXS2DQXAPXXGNJ6A6O3A3S3L5QZANCNFSM4NWSLYAA>.
|
For mac users, and targeting 1. update global tools: ``` dotnet tool install --global dotnet-aspnet-codegenerator dotnet tool update --global dotnet-aspnet-codegenerator dotnet tool install --global dotnet-ef dotnet tool update --global dotnet-ef ```
If all fine it will show available generators. |
When running
dotnet aspnet-codegenerator controller -name AuthorController -async -api -m Author -dc MyDbContext -outDir Controller
I get the following error
Steps to reproduce:
run
dotnet aspnet-codegenerator controller -name AuthorController -async -api -m Author -dc MyDbContext -outDir Controller
Here is my csproj
Here is my dotnet-tools.json
Expected behavior:
Controller to be created
Actual behavior:
Failure
Additional information about the project being scaffolded, such as:
Target framework(s):
netcoreapp3.1
Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):
Not manually selected
Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:
3.1.3
The text was updated successfully, but these errors were encountered: