Hi @AlexD ,
The problem is that in program.cs it generates additional connection string (so there are two of them), as well as dublicates of builder.Services.AddDbContext... and builder.Services.AddDefaultIdentity...
Everything works fine if I delete (comment out) this newly generated lines but I do not know what am I doing wrong.
I could reproduce the problem on Asp.net 6 application and use VS 2022. This error appeared recently and only on Asp.net 6, it does not happen on the Asp.Net 5 and the previous version. And I found this issue has been feedback to the Asp.net development team, you can check it and wait the response.
As a temporary solution, as you said you can delete or comment out the duplicate lines. Or you can create an Asp.net 5 or previous version application.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion