From 4861ef339121fb635ab9d575f95ac1bbda7039eb Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Tue, 14 Feb 2017 08:48:29 -0800 Subject: [PATCH] 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 --- .../IntegrationTests/IntegrationTestBase.cs | 8 ++++---- .../Microsoft.AspNetCore.Razor.Evolution.Test.csproj | 3 ++- .../Microsoft.AspNetCore.Razor.Runtime.Test.csproj | 3 ++- .../TagHelperDesignTimeDescriptorFactoryTest.cs | 2 +- .../Runtime/TagHelpers/XmlDocumentationProviderTest.cs | 2 +- .../Microsoft.AspNetCore.Razor.Test.csproj | 3 ++- .../Microsoft.CodeAnalysis.Razor.Test.csproj | 3 ++- .../Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj | 3 ++- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs index 59ffa0e4a7..252bb1da84 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs @@ -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 _filename = new AsyncLocal(); #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"); diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj index df6774411e..3ba14a935a 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj @@ -1,7 +1,8 @@  - netcoreapp1.1;net451 + netcoreapp1.1;net452 + netcoreapp1.1 $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES $(DefaultItemExcludes);TestFiles\**\* diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj index 01032bcf98..30dfa14737 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj @@ -1,7 +1,8 @@  - netcoreapp1.1;net451 + netcoreapp1.1;net452 + netcoreapp1.1 $(DefaultItemExcludes);TestFiles\**\* diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs index 44538e00cc..ddff02bc1f 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs @@ -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; diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs index c5afc57e22..5d99dac577 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs @@ -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; diff --git a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj index d3663691cd..be8485f5e4 100644 --- a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj +++ b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj @@ -1,7 +1,8 @@  - netcoreapp1.1;net451 + netcoreapp1.1;net452 + netcoreapp1.1 $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES $(DefaultItemExcludes);TestFiles\**\* diff --git a/test/Microsoft.CodeAnalysis.Razor.Test/Microsoft.CodeAnalysis.Razor.Test.csproj b/test/Microsoft.CodeAnalysis.Razor.Test/Microsoft.CodeAnalysis.Razor.Test.csproj index bc498652d5..b7227529b0 100644 --- a/test/Microsoft.CodeAnalysis.Razor.Test/Microsoft.CodeAnalysis.Razor.Test.csproj +++ b/test/Microsoft.CodeAnalysis.Razor.Test/Microsoft.CodeAnalysis.Razor.Test.csproj @@ -3,7 +3,8 @@ true $(NoWarn);CS1591 - netcoreapp1.1;net451 + netcoreapp1.1;net452 + netcoreapp1.1 $(DefaultItemExcludes);TestFiles\**\* diff --git a/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj b/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj index 8e767ee496..d7d62f8fc1 100644 --- a/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj +++ b/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj @@ -3,7 +3,8 @@ true $(NoWarn);CS1591 - netcoreapp1.1;net451 + netcoreapp1.1;net452 + netcoreapp1.1 $(DefaultItemExcludes);TestFiles\**\*