IdentityServer4.EntityFramework.Stores.ResourceStore没有实现

时间:2017-07-21 09:37:58

标签: c# asp.net-core identityserver4

我在Visual Studio 2017 Preview中使用IdentityServer4-2.0.0-preview2IdentityServer4.EntityFramework-1.0.1。我得到了一个例外情况如下:

  

System.TypeLoadException:“类型中的方法'GetAllResourcesAsync'   来自程序集的'IdentityServer4.EntityFramework.Stores.ResourceStore'   'IdentityServer4.EntityFramework,Version = 1.0.1.0,Culture = neutral,   PublicKeyToken = null'没有实现。“

image

这是我的代码:

public void ConfigureServices(IServiceCollection services)
{

    services.AddMvc();
    services.AddCookieAuthentication();
    var connectionString = Configuration.GetConnectionString("DefaultConnection");
    var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
    services.AddDbContext<EntityLibrary.Models.ExportOMSContext>(options => options.UseSqlServer(connectionString)); 
    var service_builder = services.AddIdentityServer();  
    service_builder.AddDeveloperSigningCredential(); 
    service_builder.AddConfigurationStore(builder =>builder.UseSqlServer(connectionString));
    service_builder.AddOperationalStore(builder =>builder.UseSqlServer(connectionString));
    service_builder.Services.AddTransient<IResourceOwnerPasswordValidator, ResourceOwnerPasswordValidator>();
}

1 个答案:

答案 0 :(得分:0)

EF nuget现在还没有在asp net core 2上工作。您可以尝试自己构建源代码。