大火现有项目| ASP.NET身份脚手架不起作用

发布于 2025-02-05 12:16:04 字数 698 浏览 2 评论 0原文

我正在尝试在现有项目中使用登录/登录页面上的ASP.NET身份。

上下文也设置了,最初的迁移在那里。

不过,我现在想将整个脚手架添加到该项目中。

我为6.0添加了EF Core Nuget,但是我仍然存在此错误:

”![在此处输入Image

似乎正在尝试使用我已经有过的现有代码来做某事?

有没有办法重置ASP.NET身份还是?

我尝试了componentbase 该分辨率我的剃刀页面上的项目,但随后遇到了我的公用事业课程的问题。

EF Core为6.0.5。

脚手架是否不适用于最新的EFCORE项目?

谢谢。

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:

![enter image description here

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情深如许 2025-02-12 12:16:04

我在EF Core 6.0.5上。

我认为版本低于6.0的问题或您的项目生活中添加ASPNET身份时?它不知道如何处理其他文件,因此失败。如果您从一开始就进行脚手架,那么没有什么可以出错了!

我创建了一个新项目,在全新的应用程序上进行了身份验证,然后复制所有文件,重命名为命名空间,修复了我的身份证器,然后一切都可以使用!

我试图降级EF Core版本,运行脚手架,然后将其更新为6.0.6,但这无效。

我发现的最快答案是:手动做,只需复制您的测试项目中的文件,然后重建直到捕获所有内容!

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 aspnet 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文