From 9d26c40144ccaa41f2f46d8db88262a57a3130fc Mon Sep 17 00:00:00 2001 From: David Fowler Date: Thu, 4 Sep 2014 02:10:19 -0700 Subject: [PATCH] Updated to use the new target framework in project.json --- .../IdentitySample.Mvc/Controllers/ManageController.cs | 8 ++++---- samples/IdentitySample.Mvc/project.json | 2 +- src/Microsoft.AspNet.Identity.Authentication/project.json | 2 +- src/Microsoft.AspNet.Identity.SqlServer/project.json | 2 +- src/Microsoft.AspNet.Identity/UserValidator.cs | 6 +++--- src/Microsoft.AspNet.Identity/project.json | 2 +- .../HttpSignInTest.cs | 4 ++-- .../project.json | 2 +- .../HttpSignInTest.cs | 4 ++-- test/Microsoft.AspNet.Identity.InMemory.Test/project.json | 2 +- .../project.json | 2 +- .../Microsoft.AspNet.Identity.SqlServer.Test/project.json | 3 +-- .../ClaimsIdentityFactoryTest.cs | 4 ++-- test/Microsoft.AspNet.Identity.Test/project.json | 2 +- test/Shared/UserManagerTestBase.cs | 4 ++-- 15 files changed, 24 insertions(+), 25 deletions(-) diff --git a/samples/IdentitySample.Mvc/Controllers/ManageController.cs b/samples/IdentitySample.Mvc/Controllers/ManageController.cs index 4a2c5d9e..6cd4d650 100644 --- a/samples/IdentitySample.Mvc/Controllers/ManageController.cs +++ b/samples/IdentitySample.Mvc/Controllers/ManageController.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNet.Identity; +using Microsoft.AspNet.Identity; using Microsoft.AspNet.Mvc; using IdentitySample.Models; using System.Security.Principal; @@ -92,7 +92,7 @@ namespace IdentitySample return View(model); } // Generate the token and send it -#if NET45 +#if ASPNET50 var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), model.Number); if (UserManager.SmsService != null) { @@ -165,7 +165,7 @@ namespace IdentitySample { // This code allows you exercise the flow without actually sending codes // For production use please register a SMS provider in IdentityConfig and generate a code here. -#if NET45 +#if ASPNET50 var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), phoneNumber); ViewBag.Status = "For DEMO purposes only, the current code is " + code; #endif @@ -377,4 +377,4 @@ namespace IdentitySample #endregion } -} \ No newline at end of file +} diff --git a/samples/IdentitySample.Mvc/project.json b/samples/IdentitySample.Mvc/project.json index b2fbf458..8b0206cb 100644 --- a/samples/IdentitySample.Mvc/project.json +++ b/samples/IdentitySample.Mvc/project.json @@ -22,7 +22,7 @@ "run": "run server.urls=http://localhost:5003" }, "frameworks": { - "net451": { + "aspnet50": { }, "aspnetcore50": { } diff --git a/src/Microsoft.AspNet.Identity.Authentication/project.json b/src/Microsoft.AspNet.Identity.Authentication/project.json index 645bae07..0f6cf14b 100644 --- a/src/Microsoft.AspNet.Identity.Authentication/project.json +++ b/src/Microsoft.AspNet.Identity.Authentication/project.json @@ -8,7 +8,7 @@ "System.Security.Claims" : "1.0.0-*" }, "frameworks": { - "net45": {}, + "aspnet50": {}, "aspnetcore50": { "dependencies": { "System.Collections": "4.0.10.0", diff --git a/src/Microsoft.AspNet.Identity.SqlServer/project.json b/src/Microsoft.AspNet.Identity.SqlServer/project.json index 41b7e678..d21c0fa4 100644 --- a/src/Microsoft.AspNet.Identity.SqlServer/project.json +++ b/src/Microsoft.AspNet.Identity.SqlServer/project.json @@ -6,7 +6,7 @@ "System.Security.Claims" : "1.0.0-*" }, "frameworks": { - "net451": { + "aspnet50": { "dependencies": { "System.Collections": "", "System.Runtime": "" diff --git a/src/Microsoft.AspNet.Identity/UserValidator.cs b/src/Microsoft.AspNet.Identity/UserValidator.cs index 9d10b25b..2fea5053 100644 --- a/src/Microsoft.AspNet.Identity/UserValidator.cs +++ b/src/Microsoft.AspNet.Identity/UserValidator.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -#if NET45 +#if ASPNET50 using System.Net.Mail; #endif using System.Threading; @@ -120,7 +120,7 @@ namespace Microsoft.AspNet.Identity errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email")); return; } -#if NET45 +#if ASPNET50 try { var m = new MailAddress(email); @@ -139,4 +139,4 @@ namespace Microsoft.AspNet.Identity } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNet.Identity/project.json b/src/Microsoft.AspNet.Identity/project.json index ac6f89b9..6d84a886 100644 --- a/src/Microsoft.AspNet.Identity/project.json +++ b/src/Microsoft.AspNet.Identity/project.json @@ -7,7 +7,7 @@ "System.Security.Claims" : "1.0.0-*" }, "frameworks": { - "net45": {}, + "aspnet50": {}, "aspnetcore50": { "dependencies": { "System.Collections": "4.0.10.0", diff --git a/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs b/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs index 30c1c993..4da411e5 100644 --- a/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs +++ b/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test public class HttpSignInTest { -#if NET45 +#if ASPNET50 //[Theory] //[InlineData(true)] //[InlineData(false)] @@ -527,4 +527,4 @@ namespace Microsoft.AspNet.Identity.Authentication.Test } #endif } -} \ No newline at end of file +} diff --git a/test/Microsoft.AspNet.Identity.Authentication.Test/project.json b/test/Microsoft.AspNet.Identity.Authentication.Test/project.json index c61daaf0..50211cbd 100644 --- a/test/Microsoft.AspNet.Identity.Authentication.Test/project.json +++ b/test/Microsoft.AspNet.Identity.Authentication.Test/project.json @@ -19,7 +19,7 @@ }, "code": "**\\*.cs;..\\Shared\\*.cs", "frameworks": { - "net45": { + "aspnet50": { "dependencies": { "Moq" : "4.2.1312.1622", "System.Runtime": "", diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs b/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs index 1a3035ce..6883c4f0 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.InMemory.Test public class HttpSignInTest { -#if NET45 +#if ASPNET50 [Theory] [InlineData(true)] [InlineData(false)] @@ -63,4 +63,4 @@ namespace Microsoft.AspNet.Identity.InMemory.Test } #endif } -} \ No newline at end of file +} diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/project.json b/test/Microsoft.AspNet.Identity.InMemory.Test/project.json index 7a1b9e3f..e4b1a44a 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/project.json +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/project.json @@ -15,7 +15,7 @@ }, "code": "**\\*.cs;..\\Shared\\*.cs", "frameworks": { - "net45": { + "aspnet50": { "dependencies": { "Moq" : "4.2.1312.1622", "System.Collections": "", diff --git a/test/Microsoft.AspNet.Identity.SqlServer.InMemory.Test/project.json b/test/Microsoft.AspNet.Identity.SqlServer.InMemory.Test/project.json index a0ac225c..69c3d2ea 100644 --- a/test/Microsoft.AspNet.Identity.SqlServer.InMemory.Test/project.json +++ b/test/Microsoft.AspNet.Identity.SqlServer.InMemory.Test/project.json @@ -14,7 +14,7 @@ }, "code": "**\\*.cs;..\\Shared\\*.cs", "frameworks": { - "net451": { + "aspnet50": { "dependencies": { "Moq" : "4.2.1312.1622", "System.Collections": "", diff --git a/test/Microsoft.AspNet.Identity.SqlServer.Test/project.json b/test/Microsoft.AspNet.Identity.SqlServer.Test/project.json index b428615a..6c054808 100644 --- a/test/Microsoft.AspNet.Identity.SqlServer.Test/project.json +++ b/test/Microsoft.AspNet.Identity.SqlServer.Test/project.json @@ -15,7 +15,7 @@ }, "code": "**\\*.cs;..\\Shared\\*.cs", "frameworks": { - "net451": { + "aspnet50": { "dependencies": { "Moq" : "4.2.1312.1622", "System.Collections": "", @@ -23,7 +23,6 @@ } } }, - "code": "**\\*.cs;..\\Shared\\*.cs", "commands": { "test": "Xunit.KRunner" } diff --git a/test/Microsoft.AspNet.Identity.Test/ClaimsIdentityFactoryTest.cs b/test/Microsoft.AspNet.Identity.Test/ClaimsIdentityFactoryTest.cs index c0c04e0e..2a873390 100644 --- a/test/Microsoft.AspNet.Identity.Test/ClaimsIdentityFactoryTest.cs +++ b/test/Microsoft.AspNet.Identity.Test/ClaimsIdentityFactoryTest.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Identity.Test async () => await factory.CreateAsync(new TestUser(), null)); } -#if NET45 +#if ASPNET50 //TODO: Mock fails in K (this works fine in net45) [Theory] [InlineData(false, false, false)] @@ -102,4 +102,4 @@ namespace Microsoft.AspNet.Identity.Test } #endif } -} \ No newline at end of file +} diff --git a/test/Microsoft.AspNet.Identity.Test/project.json b/test/Microsoft.AspNet.Identity.Test/project.json index 897b383a..55c568e0 100644 --- a/test/Microsoft.AspNet.Identity.Test/project.json +++ b/test/Microsoft.AspNet.Identity.Test/project.json @@ -12,7 +12,7 @@ }, "code": "**\\*.cs;..\\Shared\\*.cs", "frameworks": { - "net45": { + "aspnet50": { "dependencies": { "Moq" : "4.2.1312.1622", "System.Collections": "", diff --git a/test/Shared/UserManagerTestBase.cs b/test/Shared/UserManagerTestBase.cs index e0f2fc65..eabab993 100644 --- a/test/Shared/UserManagerTestBase.cs +++ b/test/Shared/UserManagerTestBase.cs @@ -125,7 +125,7 @@ namespace Microsoft.AspNet.Identity.Test IdentityResultAssert.IsFailure(await manager.CreateAsync(user), "Email cannot be null or empty."); } -#if NET45 +#if ASPNET50 [Theory] [InlineData("@@afd")] [InlineData("bogus")] @@ -1564,4 +1564,4 @@ namespace Microsoft.AspNet.Identity.Test } } -} \ No newline at end of file +}