TypeLoadException Exception
Sorry, but your code doesn't work. Today I downloaded it and compiled it successfully, but the Visual Studio 2022 (17.9.0) gives the following error when executing it: System.TypeLoadException: 'Could not load type 'Microsoft.AspNetCore.Components.Web.RenderModeInteractiveAutoAttribute' from assembly 'Microsoft.AspNetCore.Components.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.'
Also see attached screenshot
I have updated the nuget packages to 8.0.2 version and replaced
@attribute [RenderModeInteractiveAuto]
to
@rendermode InteractiveAuto
and the code at least executing now (I haven't checked the functionality yet)
perhaps create a PR?
perhaps create a PR?
Your current code for .net 8 PR but I haven't the installed .net 8 PR (only .not 8) so I opened and compiled the project for .net 8.
Also I have found on current time the following errors (in my opinion) in the code:
-
In the ApplicationDbContext.cs:
builder.Entity<IdentityUser>(entity =>...need:builder.Entity<ApplicationUser>(entity => -
In the Login.razor:
var result = await SignInManager.PasswordSignInAsync(Input.Email, Input.Password...need:var result = await SignInManager.PasswordSignInAsync(userName, Input.Password... -
The "Logout" not working because the "LogoutForm" not found, see screenshot:
So need to add:
@using BlazorIdentity.Components.Identity