简体   繁体   中英

Blazor Existing Project | Asp.net Identity scaffolding is not working

I'm trying to scaffold asp.net identity in an existing project with the Login/Logoff pages already.

The context is set up as well and the initial migration is there.

I want to add the entire scaffolding to the project now though.

I added EF Core nuget for 6.0, but I am still having this error:

![在此处输入图片描述

Seems like it is trying to do something with the existing code I already have there?

Is there a way to reset the asp.net identity or?

I tried this for the ComponentBase Attempted this resolution items on my razor pages, but then it just ran into issues with my utilities classes.

EF Core is on 6.0.5.

Does the scaffolding not working on the latest EFCore items for identity?

Thanks.

I was on EF Core 6.0.5.

I think there is an issue with version lower than 6.0 or something when you add as.net identity later on in your project life? It doesn't know how to handle the other files and therefore fails. If you do your scaffolding from the start, there is nothing there to error out!

I created a new project, did the authentication on a brand new application, then copied all the files over, renamed the namespaces, fixed my IdentityUser and then everything worked!

I attempted to downgrade the EF Core version, run the scaffolding, then update it back to 6.0.6, but that did not work.

Quickest answer I found: Do it manually and just copy over the files from your test project and rebuild until you catch everything!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM