Convert TFM to net451 to allow custom test discovery

This commit is contained in:
John Luo 2016-02-16 17:59:17 -08:00
parent 0633690715
commit 6aa848dd93
4 changed files with 6 additions and 7 deletions

View File

@ -126,7 +126,7 @@ namespace Microsoft.AspNetCore.Server.Testing
protected void AddEnvironmentVariablesToProcess(ProcessStartInfo startInfo) protected void AddEnvironmentVariablesToProcess(ProcessStartInfo startInfo)
{ {
var environment = var environment =
#if DNX451 #if NET451
startInfo.EnvironmentVariables; startInfo.EnvironmentVariables;
#elif DNXCORE50 #elif DNXCORE50
startInfo.Environment; 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) protected void SetEnvironmentVariable(System.Collections.Specialized.StringDictionary environment, string name, string value)
{ {
#elif DNXCORE50 #elif DNXCORE50

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 DNX451 #if NET451
using System; using System;
using System.Linq; using System.Linq;

View File

@ -95,10 +95,10 @@ namespace Microsoft.AspNetCore.Server.Testing
// IIS express figures out the DNX from %PATH%. // IIS express figures out the DNX from %PATH%.
#if NET451 #if NET451
SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", ChosenRuntimePath + ";" + startInfo.EnvironmentVariables["PATH"]); SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", startInfo.EnvironmentVariables["PATH"]);
SetEnvironmentVariable(startInfo.EnvironmentVariables, "DNX_APPBASE", DeploymentParameters.ApplicationPath); SetEnvironmentVariable(startInfo.EnvironmentVariables, "DNX_APPBASE", DeploymentParameters.ApplicationPath);
#elif DOTNET5_4 #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); SetEnvironmentVariable(startInfo.Environment, "DNX_APPBASE", DeploymentParameters.ApplicationPath);
#endif #endif

View File

@ -16,13 +16,12 @@
"Microsoft.NETCore.Platforms": "1.0.1-*" "Microsoft.NETCore.Platforms": "1.0.1-*"
}, },
"frameworks": { "frameworks": {
"dnx451": { "net451": {
"dependencies": { "dependencies": {
"Microsoft.Web.Administration": "7.0.0" "Microsoft.Web.Administration": "7.0.0"
}, },
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Net.Http": "", "System.Net.Http": "",
"System.Xml": ""
} }
}, },
"dnxcore50": { "dnxcore50": {