I am creating a .NET project(ide:Rider) with .NET 8 by selecting the Individual Authentication option. When I try to add a new Identity to the Areas folder via the popup using “Add Scaffolded Item”, I receive the following error:
“No code generators found with the name ‘ıdentity’
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGeneratorsLocator.GetCodeGenerator(String codeGeneratorName)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:01.06
Scaffolding ‘Identity’ has finished with errors:
I haven’t been able to resolve this issue. Could you please help me?
I updated the NuGet packages and the framework.
I am creating a .NET project(ide:Rider) with .NET 8 by selecting the Individual Authentication option. When I try to add a new Identity to the Areas folder via the popup using “Add Scaffolded Item”, I receive the following error:
“No code generators found with the name ‘ıdentity’
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGeneratorsLocator.GetCodeGenerator(String codeGeneratorName)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:01.06
Scaffolding ‘Identity’ has finished with errors:
I haven’t been able to resolve this issue. Could you please help me?
I updated the NuGet packages and the framework.
Share Improve this question edited Mar 4 at 3:29 Brando Zhang 28.7k6 gold badges42 silver badges70 bronze badges asked Mar 2 at 21:04 Bilal Furkan KaracaBilal Furkan Karaca 1 1- See following which has sample c# code : learn.microsoft/en-us/aspnet/core/security/authentication/… – jdweng Commented Mar 2 at 21:37
2 Answers
Reset to default 0Firstly I suggest you could check the Target Framework Moniker (TFM) matches the NuGet package version in the project file. For example, the following project file contains the version 3.1 for .NET Core and the listed NuGet packages:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.0" />
</ItemGroup>
</Project>
If update the package still not working, I suggest you could try to use command instead of using the IDE's UI to see if this will work or not.
More details, you could refer to this article.
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.13"/>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.13"/>
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.13"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.13"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.13"/>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />