I have an API originally having .net core V2.2 and referencing a .net Standard Dll where I'm having a specific implementation of IAuthorizationPolicyProvider interface. However, when upgrading the API to .net core V3.1, I had the following error :
'Method 'GetFallbackPolicyAsync' in type 'xxx' from assembly 'xxx' does not have an implementation.'
Based on the following link (https://learn.microsoft.com/en-us/dotnet/core/compatibility/2.2-3.0), I've added the GetFallbackPolicyAsync like the below :
public Task<AuthorizationPolicy> GetFallbackPolicyAsync() => Task.FromResult<AuthorizationPolicy>(null);
But the same error occurs. Any idea what could be the cause?
Thanks in advance,
Found the problem. I have a DLL referenced in the project containing an older version of Microsoft.AspNetCore.Authorization. I had to install latest version Authorization dll from nugget containing an implementation of the GetFallbackPolicyAsync method.