Bump test projects up to .NET 4.5.2

- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- update AppVeyor config so this framework version is available
- build tests for desktop .NET only on Windows
This commit is contained in:
Doug Bunting 2017-02-16 16:45:01 -08:00
parent 39f41eae3c
commit 63507c8da9
49 changed files with 61 additions and 60 deletions

View File

@ -10,4 +10,5 @@ build_script:
- build.cmd --quiet verify - build.cmd --quiet verify
clone_depth: 1 clone_depth: 1
test: off test: off
deploy: off deploy: off
os: Visual Studio 2017 RC

View File

@ -22,6 +22,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -21,6 +21,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -6,7 +6,7 @@ using Xunit;
namespace Microsoft.AspNetCore.Mvc.Infrastructure namespace Microsoft.AspNetCore.Mvc.Infrastructure
{ {
#if NET451 #if NET452
public class ActionContextAccessorTests public class ActionContextAccessorTests
{ {
private static void DomainFunc() private static void DomainFunc()

View File

@ -34,6 +34,6 @@
"System.Xml.XmlDocument": "4.3.0" "System.Xml.XmlDocument": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -24,6 +24,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -27,6 +27,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -24,6 +24,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if NET451 #if NET452
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;

View File

@ -22,6 +22,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -22,10 +22,10 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public async Task CompilationOptions_AreUsedByViewsAndPartials() public async Task CompilationOptions_AreUsedByViewsAndPartials()
{ {
// Arrange // Arrange
#if NET451 #if NET452
var expected = var expected =
@"This method is running from NET451 @"This method is running from NET452
This method is only defined in NET451"; This method is only defined in NET452";
#elif NETCOREAPP1_1 #elif NETCOREAPP1_1
var expected = var expected =
@"This method is running from NETCOREAPP1_1 @"This method is running from NETCOREAPP1_1

View File

@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
// The desktop CLR does not correctly read the stack trace from portable PDBs. However generating full pdbs // The desktop CLR does not correctly read the stack trace from portable PDBs. However generating full pdbs
// is only supported on machines with CLSID_CorSymWriter available. On desktop, we'll skip this test on // is only supported on machines with CLSID_CorSymWriter available. On desktop, we'll skip this test on
// machines without this component. // machines without this component.
#if NET451 #if NET452
if (!SymbolsUtility.SupportsFullPdbGeneration()) if (!SymbolsUtility.SupportsFullPdbGeneration())
{ {
return; return;

View File

@ -96,6 +96,6 @@
}, },
"imports": "portable-net451+win8" "imports": "portable-net451+win8"
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -23,6 +23,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -24,6 +24,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -33,6 +33,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -38,6 +38,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -25,6 +25,6 @@
} }
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -32,6 +32,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -24,6 +24,6 @@
"System.Xml.XmlDocument": "4.3.0" "System.Xml.XmlDocument": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -4,7 +4,7 @@
"keyFile": "../../tools/Key.snk" "keyFile": "../../tools/Key.snk"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netstandard1.6": { "netstandard1.6": {
"dependencies": { "dependencies": {
"System.ComponentModel.Annotations": "4.3.0" "System.ComponentModel.Annotations": "4.3.0"

View File

@ -1,7 +1,7 @@
{ {
"shared": "**/*.cs", "shared": "**/*.cs",
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netstandard1.3": { "netstandard1.3": {
"dependencies": { "dependencies": {
"NETStandard.Library": "1.6.1" "NETStandard.Library": "1.6.1"

View File

@ -30,6 +30,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -27,6 +27,6 @@
"System.Diagnostics.TraceSource": "4.3.0" "System.Diagnostics.TraceSource": "4.3.0"
} }
}, },
"net451": {} "net452": {}
} }
} }

View File

@ -14,7 +14,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -13,7 +13,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -19,7 +19,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -6,7 +6,7 @@
"Microsoft.AspNetCore.Mvc": "1.2.0-*" "Microsoft.AspNetCore.Mvc": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": {} "netcoreapp1.1": {}
} }
} }

View File

@ -19,7 +19,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -20,7 +20,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -14,7 +14,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -17,7 +17,7 @@
"Microsoft.Extensions.FileProviders.Embedded": "1.2.0-*" "Microsoft.Extensions.FileProviders.Embedded": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -16,7 +16,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -14,7 +14,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -17,7 +17,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -8,7 +8,7 @@
"NETStandard.Library": "1.6.1" "NETStandard.Library": "1.6.1"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netstandard1.3": {} "netstandard1.3": {}
} }
} }

View File

@ -14,7 +14,7 @@
"Microsoft.Extensions.DiagnosticAdapter": "1.2.0-*" "Microsoft.Extensions.DiagnosticAdapter": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -7,22 +7,22 @@ namespace RazorWebSite
{ {
public string ExecuteOperation() public string ExecuteOperation()
{ {
#if NET451 || DNX451 #if NET452
return "This method is running from NET451"; return "This method is running from NET452";
#elif NETCOREAPP1_1 #elif NETCOREAPP1_1
return "This method is running from NETCOREAPP1_1"; return "This method is running from NETCOREAPP1_1";
#endif #endif
} }
#if NET451_CUSTOM_DEFINE #if NET452_CUSTOM_DEFINE
public string ExecuteNet451Operation() public string ExecuteNet452Operation()
{ {
return "This method is only defined in NET451"; return "This method is only defined in NET452";
} }
#endif #endif
#if NETCOREAPP1_1_CUSTOM_DEFINE #if NETCOREAPP1_1_CUSTOM_DEFINE
public string ExecuteNetCoreApp1_0Operation() public string ExecuteNetCoreApp1_1Operation()
{ {
return "This method is only defined in NETCOREAPP1_1"; return "This method is only defined in NETCOREAPP1_1";
} }

View File

@ -29,8 +29,8 @@ namespace RazorWebSite
$"{nameof(RazorWebSite)}.EmbeddedViews")); $"{nameof(RazorWebSite)}.EmbeddedViews"));
options.FileProviders.Add(updateableFileProvider); options.FileProviders.Add(updateableFileProvider);
options.ViewLocationExpanders.Add(new NonMainPageViewLocationExpander()); options.ViewLocationExpanders.Add(new NonMainPageViewLocationExpander());
#if NET451 #if NET452
options.ParseOptions = options.ParseOptions.WithPreprocessorSymbols("DNX451", "NET451_CUSTOM_DEFINE"); options.ParseOptions = options.ParseOptions.WithPreprocessorSymbols("NET452", "NET452_CUSTOM_DEFINE");
#endif #endif
}) })
.AddViewOptions(options => .AddViewOptions(options =>

View File

@ -1,11 +1,11 @@
@inject FrameworkSpecificHelper MyHelper @inject FrameworkSpecificHelper MyHelper
@{ @{
string value = string value =
#if NET451_CUSTOM_DEFINE #if NET452_CUSTOM_DEFINE
MyHelper.ExecuteNet451Operation(); MyHelper.ExecuteNet452Operation();
#endif #endif
#if NETCOREAPP1_1_CUSTOM_DEFINE #if NETCOREAPP1_1_CUSTOM_DEFINE
MyHelper.ExecuteNetCoreApp1_0Operation(); MyHelper.ExecuteNetCoreApp1_1Operation();
#endif #endif
} }
@value @value

View File

@ -24,10 +24,10 @@
"Microsoft.Extensions.FileProviders.Embedded": "1.2.0-*" "Microsoft.Extensions.FileProviders.Embedded": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": { "net452": {
"buildOptions": { "buildOptions": {
"define": [ "define": [
"NET451_CUSTOM_DEFINE" "NET452_CUSTOM_DEFINE"
] ]
} }
}, },

View File

@ -13,7 +13,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -18,7 +18,7 @@
} }
} }
}, },
"net451": {} "net452": {}
}, },
"publishOptions": { "publishOptions": {
"include": [ "include": [

View File

@ -9,7 +9,7 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*" "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -19,7 +19,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -1,6 +1,6 @@
{ {
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netstandard1.3": { "netstandard1.3": {
"dependencies": { "dependencies": {
"NETStandard.Library": "1.6.1" "NETStandard.Library": "1.6.1"

View File

@ -13,7 +13,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {

View File

@ -14,7 +14,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"imports": "portable-net451+win8", "imports": "portable-net451+win8",
"dependencies": { "dependencies": {

View File

@ -14,7 +14,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*" "Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
}, },
"frameworks": { "frameworks": {
"net451": {}, "net452": {},
"netcoreapp1.1": { "netcoreapp1.1": {
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {