Two things contributed to this:
- You're implementing the UserName property of the IUser interface explicitly
- In version 2 of the Asp.Net Identity Framework, the definition of the IUser interface changed. The UserName property is now defined on a generic IUser interface, from which the non-generic IUser interface inherits.
When you implement interfaces explicitly, C# expects you to qualify the member name with the name of the least-derived interface, not the name of an interface which may inherit from it.
To fix your code, you need to do this:
public class User : IUser
{
string IUser<string>.UserName { get { return Email;} set { Email = value;}}
}
Bonus Example
Here's a complete example which generates the same error message:
public interface Base
{
string MyProperty { get; set; }
}
public interface Inherited : Base
{
}
public class Implementor : Inherited
{
string Inherited.MyProperty { get; set; }
}