Updated to use the new target framework in project.json

This commit is contained in:
David Fowler 2014-09-04 02:10:19 -07:00
parent 0705d3a5ae
commit 9d26c40144
15 changed files with 24 additions and 25 deletions

View File

@ -1,4 +1,4 @@
using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using IdentitySample.Models; using IdentitySample.Models;
using System.Security.Principal; using System.Security.Principal;
@ -92,7 +92,7 @@ namespace IdentitySample
return View(model); return View(model);
} }
// Generate the token and send it // Generate the token and send it
#if NET45 #if ASPNET50
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), model.Number); var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), model.Number);
if (UserManager.SmsService != null) if (UserManager.SmsService != null)
{ {
@ -165,7 +165,7 @@ namespace IdentitySample
{ {
// This code allows you exercise the flow without actually sending codes // 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. // 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); var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), phoneNumber);
ViewBag.Status = "For DEMO purposes only, the current code is " + code; ViewBag.Status = "For DEMO purposes only, the current code is " + code;
#endif #endif

View File

@ -22,7 +22,7 @@
"run": "run server.urls=http://localhost:5003" "run": "run server.urls=http://localhost:5003"
}, },
"frameworks": { "frameworks": {
"net451": { "aspnet50": {
}, },
"aspnetcore50": { "aspnetcore50": {
} }

View File

@ -8,7 +8,7 @@
"System.Security.Claims" : "1.0.0-*" "System.Security.Claims" : "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"net45": {}, "aspnet50": {},
"aspnetcore50": { "aspnetcore50": {
"dependencies": { "dependencies": {
"System.Collections": "4.0.10.0", "System.Collections": "4.0.10.0",

View File

@ -6,7 +6,7 @@
"System.Security.Claims" : "1.0.0-*" "System.Security.Claims" : "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"net451": { "aspnet50": {
"dependencies": { "dependencies": {
"System.Collections": "", "System.Collections": "",
"System.Runtime": "" "System.Runtime": ""

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
#if NET45 #if ASPNET50
using System.Net.Mail; using System.Net.Mail;
#endif #endif
using System.Threading; using System.Threading;
@ -120,7 +120,7 @@ namespace Microsoft.AspNet.Identity
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email")); errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email"));
return; return;
} }
#if NET45 #if ASPNET50
try try
{ {
var m = new MailAddress(email); var m = new MailAddress(email);

View File

@ -7,7 +7,7 @@
"System.Security.Claims" : "1.0.0-*" "System.Security.Claims" : "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"net45": {}, "aspnet50": {},
"aspnetcore50": { "aspnetcore50": {
"dependencies": { "dependencies": {
"System.Collections": "4.0.10.0", "System.Collections": "4.0.10.0",

View File

@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test
public class HttpSignInTest public class HttpSignInTest
{ {
#if NET45 #if ASPNET50
//[Theory] //[Theory]
//[InlineData(true)] //[InlineData(true)]
//[InlineData(false)] //[InlineData(false)]

View File

@ -19,7 +19,7 @@
}, },
"code": "**\\*.cs;..\\Shared\\*.cs", "code": "**\\*.cs;..\\Shared\\*.cs",
"frameworks": { "frameworks": {
"net45": { "aspnet50": {
"dependencies": { "dependencies": {
"Moq" : "4.2.1312.1622", "Moq" : "4.2.1312.1622",
"System.Runtime": "", "System.Runtime": "",

View File

@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.InMemory.Test
public class HttpSignInTest public class HttpSignInTest
{ {
#if NET45 #if ASPNET50
[Theory] [Theory]
[InlineData(true)] [InlineData(true)]
[InlineData(false)] [InlineData(false)]

View File

@ -15,7 +15,7 @@
}, },
"code": "**\\*.cs;..\\Shared\\*.cs", "code": "**\\*.cs;..\\Shared\\*.cs",
"frameworks": { "frameworks": {
"net45": { "aspnet50": {
"dependencies": { "dependencies": {
"Moq" : "4.2.1312.1622", "Moq" : "4.2.1312.1622",
"System.Collections": "", "System.Collections": "",

View File

@ -14,7 +14,7 @@
}, },
"code": "**\\*.cs;..\\Shared\\*.cs", "code": "**\\*.cs;..\\Shared\\*.cs",
"frameworks": { "frameworks": {
"net451": { "aspnet50": {
"dependencies": { "dependencies": {
"Moq" : "4.2.1312.1622", "Moq" : "4.2.1312.1622",
"System.Collections": "", "System.Collections": "",

View File

@ -15,7 +15,7 @@
}, },
"code": "**\\*.cs;..\\Shared\\*.cs", "code": "**\\*.cs;..\\Shared\\*.cs",
"frameworks": { "frameworks": {
"net451": { "aspnet50": {
"dependencies": { "dependencies": {
"Moq" : "4.2.1312.1622", "Moq" : "4.2.1312.1622",
"System.Collections": "", "System.Collections": "",
@ -23,7 +23,6 @@
} }
} }
}, },
"code": "**\\*.cs;..\\Shared\\*.cs",
"commands": { "commands": {
"test": "Xunit.KRunner" "test": "Xunit.KRunner"
} }

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Identity.Test
async () => await factory.CreateAsync(new TestUser(), null)); async () => await factory.CreateAsync(new TestUser(), null));
} }
#if NET45 #if ASPNET50
//TODO: Mock fails in K (this works fine in net45) //TODO: Mock fails in K (this works fine in net45)
[Theory] [Theory]
[InlineData(false, false, false)] [InlineData(false, false, false)]

View File

@ -12,7 +12,7 @@
}, },
"code": "**\\*.cs;..\\Shared\\*.cs", "code": "**\\*.cs;..\\Shared\\*.cs",
"frameworks": { "frameworks": {
"net45": { "aspnet50": {
"dependencies": { "dependencies": {
"Moq" : "4.2.1312.1622", "Moq" : "4.2.1312.1622",
"System.Collections": "", "System.Collections": "",

View File

@ -125,7 +125,7 @@ namespace Microsoft.AspNet.Identity.Test
IdentityResultAssert.IsFailure(await manager.CreateAsync(user), "Email cannot be null or empty."); IdentityResultAssert.IsFailure(await manager.CreateAsync(user), "Email cannot be null or empty.");
} }
#if NET45 #if ASPNET50
[Theory] [Theory]
[InlineData("@@afd")] [InlineData("@@afd")]
[InlineData("bogus")] [InlineData("bogus")]