Convert TFM to net451 to allow custom test discovery
This commit is contained in:
parent
0633690715
commit
6aa848dd93
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue