Skip to content
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

Scaffolding Blazor Identity got error: An item with the same key has already been added #2928

Open
guillaumemaka opened this issue Aug 16, 2024 · 0 comments

Comments

@guillaumemaka
Copy link

guillaumemaka commented Aug 16, 2024

File bug (related #1590)

Getting an error when scaffolding blazor-identity

Steps to reproduce:

git clone https://github.com/guillaumemaka/BlazorIdentitySample.git)
cd BlazorIdentitySample/src/Blazor.Identity
dotnet restore
dotnet tool install -g aspnet-codegenerator
dotnet aspnet-codegenerator blazor-identity --databaseProvider sqlite

Exception

Building project ...
Finding the generator 'blazor-identity'...
Running the generator 'blazor-identity'...
Empty or invalid namespace provided, using default namespace.
Added IdentityDbContext class : /Users/guillaumemaka/Developer/BlazorIdentitySample/src/Blazor.Identity/Data/IdentityDataContext.cs
An item with the same key has already been added. Key: 
   at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__6_0()
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
   at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:04.30

Sample code:

https://github.com/guillaumemaka/BlazorIdentitySample.git)

Include provider and version information

Microsoft.AspNetCore.Identity.EntityFrameworkCore: "8.0.8"
Microsoft.EntityFrameworkCore.SqLite: "8.0.8"
Microsoft.EntityFrameworkCore.Tools: "8.0.8"
Microsoft.VisualStudio.Web.CodeGeneration.Design: "8.0.4"
Target framework: net8.0
Operating system: Mac OS Sonoma ARM64
IDE: Visual Studio Code

Version : 1.92.1 (Universal)
Validation : eaa41d57266683296de7d118f574d0c2652e1fc4
Date : 2024-08-07T20:16:39.455Z
Electron : 30.1.2
ElectronBuildId : 9870757
Chromium : 124.0.6367.243
Node.js : 20.14.0
V8 : 12.4.254.20-electron.0
OS : Darwin arm64 23.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant