Open davidbozo opened 4 years ago
It also happens when trying to generate controllers.
I HAVE SAME PROBLEM
PS D:\Calis\MySqlTest3> dotnet ef migrations add Test It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '2.0.7' was not found.
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
Try updating the global tool using, dotnet tool update dotnet-aspnet-codegenerator --global.
Or uninstall and reinstall if its install got messed up. Global tool and Microsoft.VisualStudio.CodeGeneration.Design version should be both 3.1.2 currently.
Try that and let me know.
@deepchoudhery recommend closing
You can't scaffold Identity without a project. Try the following:
dotnet new webapp -au Individual -uld -o RPauth
cd RPauth
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet aspnet-codegenerator identity -dc RPauth.Data.ApplicationDbContext --files "Account.Register;Account.Register"
Steps to reproduce:
Create a Web App (MVC) with Individual authentication project form the template. (I used Rider)
dotnet tool install -g dotnet-aspnet-codegenerator
dotnet restore
dotnet aspnet-codegenerator identity
OS: Ubuntu 18.04.4 LTS
Expected behavior:
Generate the identity scaffold.
Actual behavior:
Fails with the following output:
Additional information about the problem:
(Followed this issue: dotnet/AspNetCore.Docs#11666) I don't know is it count but if i delete the global tool and using:
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
Output:
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):
I'm using the 3.1.2 SDK
Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
Full csproj: