diff --git a/src/Microsoft.AspNet.Identity/Crypto.cs b/src/Microsoft.AspNet.Identity/Crypto.cs new file mode 100644 index 0000000000..eae67a17c1 --- /dev/null +++ b/src/Microsoft.AspNet.Identity/Crypto.cs @@ -0,0 +1,17 @@ +#if K10 + +using System; +using System.Runtime.CompilerServices; +//using System.Security.Cryptography; + +namespace Microsoft.AspNet.Identity +{ + public class Foo + { + public Foo() + { + System.Security.Cryptography.Rfc2898DeriveBytes foo = null; + } + } +} +#endif \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity/UserValidator.cs b/src/Microsoft.AspNet.Identity/UserValidator.cs index bd96c8c25f..3c673213af 100644 --- a/src/Microsoft.AspNet.Identity/UserValidator.cs +++ b/src/Microsoft.AspNet.Identity/UserValidator.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Globalization; +#if NET45 using System.Net.Mail; +#endif using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -96,6 +98,7 @@ namespace Microsoft.AspNet.Identity errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email")); return; } +#if NET45 try { var m = new MailAddress(email); @@ -105,6 +108,7 @@ namespace Microsoft.AspNet.Identity errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.InvalidEmail, email)); return; } +#endif var owner = await Manager.FindByEmail(email); if (owner != null && !EqualityComparer.Default.Equals(owner.Id, user.Id)) {