Bump test projects up to .NET 4.5.2

- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- build tests for desktop .NET only on Windows
This commit is contained in:
Doug Bunting 2017-02-14 08:48:29 -08:00
parent 0dbf62196c
commit 4861ef3391
8 changed files with 16 additions and 11 deletions

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
#if NET451
#if NET452
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
#else
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
private static string FindTestProjectRoot()
{
#if NET451
#if NET452
var currentDirectory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
#else
var currentDirectory = new DirectoryInfo(AppContext.BaseDirectory);
@ -50,14 +50,14 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
private static readonly bool GenerateBaselines = false;
#endif
#if !NET451
#if !NET452
private static readonly AsyncLocal<string> _filename = new AsyncLocal<string>();
#endif
// Used by the test framework to set the 'base' name for test files.
public static string Filename
{
#if NET451
#if NET452
get
{
var handle = (ObjectHandle)CallContext.LogicalGetData("IntegrationTestBase_Filename");

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**\*</DefaultItemExcludes>
</PropertyGroup>

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**\*</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>

View File

@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
".TagHelpers.DocumentedTagHelper.RemarksProperty\" />";
private static readonly string BaseDir =
#if NET451
#if NET452
AppDomain.CurrentDomain.BaseDirectory;
#else
AppContext.BaseDirectory;

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
public class XmlDocumentationProviderTest
{
private static readonly string BaseDir =
#if NET451
#if NET452
AppDomain.CurrentDomain.BaseDirectory;
#else
AppContext.BaseDirectory;

View File

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**\*</DefaultItemExcludes>
</PropertyGroup>

View File

@ -3,7 +3,8 @@
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**\*</DefaultItemExcludes>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">

View File

@ -3,7 +3,8 @@
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**\*</DefaultItemExcludes>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">