I'm trying to create WebApi with token-based authentication in my ASP.NET 5 app. I'm following these steps https://stackoverflow.com/a/29698502/2420851 . But I'm stuck already at the first one with creating RSA key.
Line RSACryptoServiceProvider myRSA = new RSACryptoServiceProvider(2048);
produces compilation error The type 'RSACryptoServiceProvider' exists in both 'System.Security.Cryptography.Csp' and 'System.Security.Cryptography.RSA'
when I add "System.Security.Cryptography.RSA": "4.0.0-beta-22819"
to my project.json
error message just changes to The type 'RSACryptoServiceProvider' exists in both 'System.Security.Cryptography.RSA' and 'mscorlib'
Namespaces System.Security.Cryptography.RSA
and System.Security.Cryptography.Csp
are both unavailable.
How can I resolve this?