question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft.AspNetCore.Components.Authorization .NETStandard 2.1

See original GitHub issue

Hello.

Thank you all for the great work!!

I followed a tutorial from Chris Sainty about “Authentication with client-side Blazor using WebAPI and ASP.NET Core Identity” (https://github.com/chrissainty/AuthenticationWithClientSideBlazor) but with Blazor 3.2.0-preview1.20073.1.

It seems to me that Blazor 3.2 is using .NETStandard 2.1 and Microsoft.AspNetCore.Components.Authorization is build for 2.0 and therefore i get an errormassage saying

System.MissingMethodException: Default constructor not found for type Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView

Is there a plan to update this Nuget or do i have to downgrade to 3.1?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
FooBartncommented, Feb 25, 2020

Interestingly enough, adding the empty lambda like simplerjiang didn’t work for me. Neither did changing the order of the services. Turning the linker off is the only thing that worked that I’ve tried thus far.

1reaction
simplerjiangcommented, Feb 24, 2020

I got the same problem at 3.2.0 preview1. But after I migrated to 3.1.0 preview4 everything is fine. It must something wrong with the component.

builder.Services.AddAuthorizationCore(options => { });

This work for me. I was following the tuition https://github.com/chrissainty/AuthenticationWithClientSideBlazor. In that case, 3.1.0 preview4 is fine.

But in 3.2.0 preview1 you must add a options lambo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blazor: Target framework of NuGet packages changed - .NET
To better align with the target framework change, the following Blazor packages no longer target .NET Standard 2.1: Microsoft.AspNetCore.
Read more >
Microsoft.AspNetCore.Authorization 2.1.0
Version Downloads Last updated 8.0.0‑preview.6.23329.11 6,236 19 days ago 8.0.0‑preview.5.23302.2 7,404 2 months ago 8.0.0‑preview.4.23260.4 7,737 2 months ago
Read more >
Microsoft.AspNetCore.Authentication 2.1.2
ASP.NET Core common types used by the various authentication middleware components. Product, Versions Compatible and additional computed ...
Read more >
Blazor WASM TargetFrameworks netstandard 2.1 and net5.0
1 project is using some packages such as Microsoft.AspNetCore.Components.WebAssembly.Build which is not used on .NET 5 version and so on...
Read more >
Please stop lying about .NET Standard 2.0 support!
In this post I have a bit of a rant about Microsoft's NuGet packages lying about supporting .NET Standard 2.0 when they kinda...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found