-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Just created new empty ASP.NET Core 3.1 project, added CodeKoenig.AspNetCore.Identity.DocumentDb
, and facing this exception:
System.TypeLoadException: Method 'NormalizeName' in type 'AspNetCore.Identity.DocumentDb.LookupNormalizer' from assembly 'CodeKoenig.AspNetCore.Identity.DocumentDb, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.\r\n at AspNetCore.Identity.DocumentDb.IdentityDocumentDbBuilderExtensions.AddDocumentDbStores(IdentityBuilder builder, Action`1 setupAction)\r\n at CosmosIdentity.Startup.ConfigureServices(IServiceCollection services)
The whole project file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CodeKoenig.AspNetCore.Identity.DocumentDb" Version="2.0.0" />
</ItemGroup>
</Project>
This is the only change I made to the template code:
public void ConfigureServices(IServiceCollection services) {
services.AddSingleton<IDocumentClient>(new DocumentClient(
serviceEndpoint: new Uri("https://localhost:8081/"),
authKeyOrResourceToken: "LOCAL"));
services.AddIdentity<DocumentDbIdentityUser, DocumentDbIdentityRole>()
.AddDocumentDbStores(options => {
options.Database = "CosmosIdentity";
options.UserStoreDocumentCollection = "AspNetIdentity";
})
.AddDefaultTokenProviders();
}
Metadata
Metadata
Assignees
Labels
No labels