NET8BlazorIdentity icon indicating copy to clipboard operation
NET8BlazorIdentity copied to clipboard

TypeLoadException Exception

Open VadimLL opened this issue 1 year ago • 4 comments

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 sshot-1

VadimLL avatar Mar 11 '24 18:03 VadimLL

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)

VadimLL avatar Mar 11 '24 19:03 VadimLL

perhaps create a PR?

274188A avatar Mar 12 '24 00:03 274188A

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.

VadimLL avatar Mar 12 '24 00:03 VadimLL

Also I have found on current time the following errors (in my opinion) in the code:

  1. In the ApplicationDbContext.cs: builder.Entity<IdentityUser>(entity =>... need: builder.Entity<ApplicationUser>(entity =>

  2. In the Login.razor: var result = await SignInManager.PasswordSignInAsync(Input.Email, Input.Password... need: var result = await SignInManager.PasswordSignInAsync(userName, Input.Password...

  3. The "Logout" not working because the "LogoutForm" not found, see screenshot: image

So need to add: @using BlazorIdentity.Components.Identity

VadimLL avatar Mar 12 '24 00:03 VadimLL