Я пытаюсь выполнить следующее:
var builder = services.AddIdentityServer(
options => { options.IssuerUri = "https://boo.com"; })
.AddExtensionGrantValidator<LPDelegationGrantValidator>()
.AddProfileService<ONBProfileService>()
.AddOperationalStore(options =>
{
options.ConfigureDbContext = b =>
{
b.UseSqlServer(connectionString, db => db.MigrationsAssembly(migrationsAssembly));
};
})
.AddConfigurationStore(options =>
{
options.ConfigureDbContext = b =>
{
b.UseSqlServer(connectionString, db => db.MigrationsAssembly(migrationsAssembly));
};
});
Раньше это работало, но затем я переместил решение в другое место и переименовал некоторые из моих проектов. Теперь происходит сбой со следующей ошибкой.
Я попытался выровнять версии пакетов, на которые ссылаюсь v3.1.3, но это не исправляет.
Есть ли прямая вперед способ решить эту проблему?
System.TypeLoadException
HResult=0x80131522
Message=Method 'FindIdentityResourcesByScopeNameAsync' in type 'IdentityServer4.EntityFramework.Stores.ResourceStore' from assembly 'IdentityServer4.EntityFramework.Storage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=f294d0afe402bb2b' does not have an implementation.
Source=IdentityServer4.EntityFramework
StackTrace:
at Microsoft.Extensions.DependencyInjection.IdentityServerEntityFrameworkBuilderExtensions.AddConfigurationStore[TContext](IIdentityServerBuilder builder, Action`1 storeOptionsAction)
at Microsoft.Extensions.DependencyInjection.IdentityServerEntityFrameworkBuilderExtensions.AddConfigurationStore(IIdentityServerBuilder builder, Action`1 storeOptionsAction)
at IdSrv_Host_Console.Startup.GetSqlConfigurationBuilder(IServiceCollection services) in C:\Workspace\dev\live-person-sts-id4\IdentityServer4\Bupa_src\Idsrv_Host_Console\Startup.cs:line 75
at IdSrv_Host_Console.Startup.ConfigureServices(IServiceCollection services) in C:\Workspace\dev\live-person-sts-id4\IdentityServer4\Bupa_src\Idsrv_Host_Console\Startup.cs:line 49
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass15_0.<BuildStartupServicesFilterPipeline>g__RunPipeline|0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass14_0.<ConfigureServices>g__ConfigureServicesWithContainerConfiguration|0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)