Closed patrickwensel closed 2 years ago
I was trying to move my ApplicationUser object to my Shared project. Microsoft.AspNetCore.Identity.UI is not needed to reference Identity in the Shared project, you only need Microsoft.AspNetCore.Identity.EntityFrameworkCore. Do you want to close this?
You need to update your projects to use the below SDK's : Client - Microsoft.NET.Sdk.BlazorWebAssembly Server - Microsoft.NET.Sdk.Web Shared - Microsoft.NET.Sdk
look at this:👇 https://github.com/dotnet/aspnetcore/issues/27738
I am ok with you closing the issue because there was a simple solution but the article you sent did not seem to address the issue. There will be other people in the future that have this same issue because of the reference confusion and I think a better answer would be helpful to those having the same confusion I did than referencing a ticket that was unrelated.
Identity UI depends on the ASP.NET Core shared framework that cannot be referenced from a blazor wasm app. By adding it to the shared project, you're adding a transitive reference to the ASP.NET Core shared framework which is what produces the error.
Is there an existing issue for this?
Describe the bug
When I add a reference to Microsoft.AspNetCore.Identity.UI to the Shared project, I get the following error:
Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. WaterWithdrawl.Client C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 427
I did not change anything from the Visual Studio .Net 6 Blazor Assemble Template
Expected Behavior
Build without errors
Steps To Reproduce
Create a new Blazor Webassembly App
Authentication Type: Individual Accounts
Add Microsoft.AspNetCore.Identity.UI to Shared Project
Build
Exceptions (if any)
No response
.NET Version
6.0
Anything else?
No response