.NET 8 Issue. Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
Unable to load the application upgrading Duende.IdentityServer to 7.0 with Microsoft.AspNetCore.ApiAuthorization.IdentityServer 7.0.20 in .NET 8.
This is still an issue for me. I tried the workaround mention on the other closed tickets related to this issue but no luck.
Microsoft.AspNetCore.ApiAuthorization.IdentityServer is still in 7, will there be a fix when the version 8 comes out? And when are we expecting that?
Error Message:
[12:57:55 FTL] Unhandled application exception
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider.PopulateFeature(IEnumerable`1 parts, ControllerFeature feature)
at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature)
at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.GetControllerTypes()
at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.GetDescriptors()
at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.UpdateCollection()
at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.Initialize()
at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.GetChangeToken()
at Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration`1..ctor(Func`1 changeTokenProducer, Action`1 changeTokenConsumer, TState state)
at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.Subscribe()
at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, String name, String pattern, Object defaults, Object constraints, Object dataTokens)
at Program.$(String[] args) in XXXXXXXXXXXXXXXXXXXXXXX\Program.cs:line XX
System.TypeLoadException: Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
[12:57:55 INF] Application shutting down
### Expected Behavior
Application should build and load with the latest Microsoft.AspNetCore.ApiAuthorization.IdentityServer 7.0.20 and be compatible with Duende.IdentityServer to 7.0 using .NET 8.
### Steps To Reproduce
Create a .NET Core 8 application that has Microsoft.AspNetCore.ApiAuthorization.IdentityServer 7.0.20. Duende.IdentityServer 6.0.4 will get installed as its dependencies.
Manually upgrade the Duende.IdentityServer to 7.0.
On Build/Run, application is not loading and returning the error message above.
### Exceptions (if any)
_No response_
### .NET Version
8.0
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.