From 6aa848dd935c4621d8324021e073e03dbded1aab Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 16 Feb 2016 17:59:17 -0800 Subject: [PATCH] Convert TFM to net451 to allow custom test discovery --- .../Deployers/ApplicationDeployer.cs | 4 ++-- .../Deployers/IISDeployer.cs | 2 +- .../Deployers/IISExpressDeployer.cs | 4 ++-- src/Microsoft.AspNetCore.Server.Testing/project.json | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs b/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs index 30cbf5aea1..7f22ac592e 100644 --- a/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs @@ -126,7 +126,7 @@ namespace Microsoft.AspNetCore.Server.Testing protected void AddEnvironmentVariablesToProcess(ProcessStartInfo startInfo) { var environment = -#if DNX451 +#if NET451 startInfo.EnvironmentVariables; #elif DNXCORE50 startInfo.Environment; @@ -140,7 +140,7 @@ namespace Microsoft.AspNetCore.Server.Testing } } -#if DNX451 +#if NET451 protected void SetEnvironmentVariable(System.Collections.Specialized.StringDictionary environment, string name, string value) { #elif DNXCORE50 diff --git a/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISDeployer.cs b/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISDeployer.cs index 2e86cd8995..3de8db733c 100644 --- a/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISDeployer.cs @@ -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 DNX451 +#if NET451 using System; using System.Linq; diff --git a/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISExpressDeployer.cs b/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISExpressDeployer.cs index 525f1c3a5c..ea7a97a054 100644 --- a/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISExpressDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.Testing/Deployers/IISExpressDeployer.cs @@ -95,10 +95,10 @@ namespace Microsoft.AspNetCore.Server.Testing // IIS express figures out the DNX from %PATH%. #if NET451 - SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", ChosenRuntimePath + ";" + startInfo.EnvironmentVariables["PATH"]); + SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", startInfo.EnvironmentVariables["PATH"]); SetEnvironmentVariable(startInfo.EnvironmentVariables, "DNX_APPBASE", DeploymentParameters.ApplicationPath); #elif DOTNET5_4 - SetEnvironmentVariable(startInfo.Environment, "PATH", ChosenRuntimePath + ";" + startInfo.Environment["PATH"]); + SetEnvironmentVariable(startInfo.Environment, "PATH", startInfo.Environment["PATH"]); SetEnvironmentVariable(startInfo.Environment, "DNX_APPBASE", DeploymentParameters.ApplicationPath); #endif diff --git a/src/Microsoft.AspNetCore.Server.Testing/project.json b/src/Microsoft.AspNetCore.Server.Testing/project.json index 5f0795ce3a..88f01a7dfd 100644 --- a/src/Microsoft.AspNetCore.Server.Testing/project.json +++ b/src/Microsoft.AspNetCore.Server.Testing/project.json @@ -16,13 +16,12 @@ "Microsoft.NETCore.Platforms": "1.0.1-*" }, "frameworks": { - "dnx451": { + "net451": { "dependencies": { "Microsoft.Web.Administration": "7.0.0" }, "frameworkAssemblies": { "System.Net.Http": "", - "System.Xml": "" } }, "dnxcore50": {