Add net451 back so windows works and Unix skips net451
This commit is contained in:
parent
5af281a6dd
commit
9263d63d2c
|
|
@ -1,8 +1,10 @@
|
||||||
// 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.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.AspNetCore.Server.Testing;
|
using Microsoft.AspNetCore.Server.Testing;
|
||||||
|
using Microsoft.Extensions.PlatformAbstractions;
|
||||||
|
|
||||||
namespace ServerComparison.FunctionalTests
|
namespace ServerComparison.FunctionalTests
|
||||||
{
|
{
|
||||||
|
|
@ -10,8 +12,23 @@ namespace ServerComparison.FunctionalTests
|
||||||
{
|
{
|
||||||
public static string GetApplicationPath(ApplicationType applicationType)
|
public static string GetApplicationPath(ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
return Path.GetFullPath(Path.Combine("..",
|
var applicationBasePath = PlatformServices.Default.Application.ApplicationBasePath;
|
||||||
applicationType == ApplicationType.Standalone? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites"));
|
|
||||||
|
var directoryInfo = new DirectoryInfo(applicationBasePath);
|
||||||
|
do
|
||||||
|
{
|
||||||
|
var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "ServerTests.sln"));
|
||||||
|
if (solutionFileInfo.Exists)
|
||||||
|
{
|
||||||
|
var projectName = applicationType == ApplicationType.Standalone ? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites";
|
||||||
|
return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "test", projectName));
|
||||||
|
}
|
||||||
|
|
||||||
|
directoryInfo = directoryInfo.Parent;
|
||||||
|
}
|
||||||
|
while (directoryInfo.Parent != null);
|
||||||
|
|
||||||
|
throw new Exception($"Solution root could not be found using {applicationBasePath}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig)
|
public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
// 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 NET451
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
@ -132,3 +133,5 @@ namespace ServerComparison.FunctionalTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
"Microsoft.AspNetCore.Server.Testing": "0.2.0-*",
|
"Microsoft.AspNetCore.Server.Testing": "0.2.0-*",
|
||||||
"Microsoft.Extensions.Logging": "1.1.0-*",
|
"Microsoft.Extensions.Logging": "1.1.0-*",
|
||||||
"Microsoft.Extensions.Logging.Console": "1.1.0-*",
|
"Microsoft.Extensions.Logging.Console": "1.1.0-*",
|
||||||
|
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
|
||||||
"Microsoft.Net.Http.Headers": "1.1.0-*"
|
"Microsoft.Net.Http.Headers": "1.1.0-*"
|
||||||
},
|
},
|
||||||
"publishOptions": {
|
"publishOptions": {
|
||||||
|
|
@ -25,6 +26,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
"net451": { },
|
||||||
"netcoreapp1.0": {
|
"netcoreapp1.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore.App": {
|
"Microsoft.NETCore.App": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue