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
clone_depth: 1
test: off
deploy: off
deploy: off
os: Visual Studio 2017 RC

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
// 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.
#if NET451
#if NET452
using System;
using System.Collections.Generic;
using System.IO;

View File

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

View File

@ -22,10 +22,10 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public async Task CompilationOptions_AreUsedByViewsAndPartials()
{
// Arrange
#if NET451
#if NET452
var expected =
@"This method is running from NET451
This method is only defined in NET451";
@"This method is running from NET452
This method is only defined in NET452";
#elif NETCOREAPP1_1
var expected =
@"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
// is only supported on machines with CLSID_CorSymWriter available. On desktop, we'll skip this test on
// machines without this component.
#if NET451
#if NET452
if (!SymbolsUtility.SupportsFullPdbGeneration())
{
return;

View File

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

View File

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

View File

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

View File

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

View File

@ -38,6 +38,6 @@
"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"
}
},
"net451": {}
"net452": {}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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