rustd/AspnetIdentitySample

unable to compile

Closed this issue · 2 comments

I have managed to update all nuget packages but compile fails with the the following error:
The type 'TUser' must be a reference type in order to use it as parameter 'TUser' in the generic type or method 'Microsoft.AspNet.Identity.ClaimsIdentityFactory

on line 12 of AspnetIdentitySample.IdentityExtensions:
declaration of class:
public class MyClaimsIdentityFactory : ClaimsIdentityFactory where TUser : IUser

I got this same error after running some NuGet package updates. It can be easily fixed by adding "class" to the where condition for TUser, e.g.,

public class MyClaimsIdentityFactory<TUser> : ClaimsIdentityFactory<TUser> where TUser : class, IUser<string>
                                                                                         ^^^^^^

Thanks Funka. Adding 'class' fixed it. However for some reason I've also had to uninstall/reinstall references to the Owin and Identity packages to get it to work even though the project built without errors.