Closed hades200082 closed 1 month ago
any chance you can provide a minimal repro? i'm not able to so far. also fwiw, the error is calling out Microsoft.AspNetCore.Authentication
not Microsoft.AspNetCore.Authorization
That's because Microsoft.AspNetCore.Authentication
2.2.0 was deprecated when ASP.Net Core 3.0 released.
In my haste I incorrectly assumed Microsoft had replaced it with Microsoft.AspNetCore.Authorization
.
See the deprecation notices and details:
My .NET 8 project is using Microsoft.AspNetCore.Authentication.JwtBearer
8.0.7 for authentication.
It looks like Microsoft.AspNetCore.Authentication, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
is "built-in" to .NET 8 "Microsoft.AspNetCore.App" reference (found in C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\8.0.7\ref\net8.0\Microsoft.AspNetCore.Authentication.dll
on my system)
HeimGuard is a great package and I'd hate to see it get left behind when MS inevitably updates this built-in assembly to no longer be compatible with 2.2.0.
Not sure exactly what you mean by getting left behind? This should just be because heimguard uses 8.0.0 directly and I can just do a release to bump it
I think this warning stems from your .NET 8 build referencing Microsoft.AspNetCore.Authorization.Policy
2.2.0 which is also deprecated and references Microsoft.AspNetCore.Authorization
2.2.0 itself.
Microsoft.AspNetCore.Authorization
2.2.0 references Microsoft.AspNetCore.Authentication.Abstractions
2.2.0 and I think this is where the namespace reference to Microsoft.AspNetCore.Authentication
is coming from that's causing the warning.
As a side note, Microsoft.AspNetCore.Http
2.2.2 is also deprecated.
Ah, yeah I see, good call. I'll take a look! Open to a PR if you can beat me to it
just pushed a patch with all the packages bumped and i just flat our removed the dated dependency -- honestly must have snuck in from dev as it literally wasn't used anywhere. thanks for the callout!
let me know if you have any issues
When using
Microsoft.AspNetCore.Authorization
in .NET 8 the following warnings are logged.Is there any way to resolve this?