diff --git a/src/Microsoft.AspNet.Hosting/Startup/StartupExceptionPage.cs b/src/Microsoft.AspNet.Hosting/Startup/StartupExceptionPage.cs index bf3125e834..0f663b231e 100644 --- a/src/Microsoft.AspNet.Hosting/Startup/StartupExceptionPage.cs +++ b/src/Microsoft.AspNet.Hosting/Startup/StartupExceptionPage.cs @@ -379,7 +379,7 @@ namespace Microsoft.AspNet.Hosting.Startup private static string GenerateFooterEncoded(IRuntimeEnvironment environment) { var runtimeType = HtmlEncodeAndReplaceLineBreaks(environment.RuntimeType); -#if DNXCORE50 +#if DNXCORE50 || DOTNET5_4 var systemRuntimeAssembly = typeof(System.ComponentModel.DefaultValueAttribute).GetTypeInfo().Assembly; var assemblyVersion = new AssemblyName(systemRuntimeAssembly.FullName).Version.ToString(); var clrVersion = HtmlEncodeAndReplaceLineBreaks(assemblyVersion); diff --git a/src/Microsoft.AspNet.Hosting/project.json b/src/Microsoft.AspNet.Hosting/project.json index 148bec393f..01d2233836 100644 --- a/src/Microsoft.AspNet.Hosting/project.json +++ b/src/Microsoft.AspNet.Hosting/project.json @@ -31,12 +31,24 @@ "System.Runtime": "" } }, + "net451": { + "frameworkAssemblies": { + "System.Runtime": "" + } + }, "dnxcore50": { "dependencies": { "System.Console": "4.0.0-beta-*", "System.Diagnostics.StackTrace": "4.0.1-beta-*", "System.Reflection.Extensions": "4.0.1-beta-*" } + }, + "dotnet5.4": { + "dependencies": { + "System.Console": "4.0.0-beta-*", + "System.Diagnostics.StackTrace": "4.0.1-beta-*", + "System.Reflection.Extensions": "4.0.1-beta-*" + } } } } diff --git a/src/Microsoft.AspNet.Server.Testing/Common/RetryHelper.cs b/src/Microsoft.AspNet.Server.Testing/Common/RetryHelper.cs index e6f9038725..6ece35a2db 100644 --- a/src/Microsoft.AspNet.Server.Testing/Common/RetryHelper.cs +++ b/src/Microsoft.AspNet.Server.Testing/Common/RetryHelper.cs @@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Server.Testing else { if (exception is HttpRequestException -#if DNX451 +#if DNX451 || NET451 || exception is System.Net.WebException #endif ) diff --git a/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployer.cs b/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployer.cs index a8dfd0e17a..8e9541199b 100644 --- a/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployer.cs +++ b/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployer.cs @@ -238,9 +238,9 @@ namespace Microsoft.AspNet.Server.Testing protected void AddEnvironmentVariablesToProcess(ProcessStartInfo startInfo) { var environment = -#if DNX451 +#if NET451 startInfo.EnvironmentVariables; -#elif DNXCORE50 +#elif DOTNET5_4 startInfo.Environment; #endif @@ -260,10 +260,10 @@ namespace Microsoft.AspNet.Server.Testing } } -#if DNX451 +#if DNX451 || NET451 protected void SetEnvironmentVariable(System.Collections.Specialized.StringDictionary environment, string name, string value) { -#elif DNXCORE50 +#elif DNXCORE50 || DOTNET5_4 protected void SetEnvironmentVariable(System.Collections.Generic.IDictionary environment, string name, string value) { #endif diff --git a/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployerFactory.cs b/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployerFactory.cs index 3bdcd17684..2ceaa03eed 100644 --- a/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployerFactory.cs +++ b/src/Microsoft.AspNet.Server.Testing/Deployers/ApplicationDeployerFactory.cs @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Server.Testing { case ServerType.IISExpress: return new IISExpressDeployer(deploymentParameters, logger); -#if DNX451 +#if NET451 case ServerType.IIS: return new IISDeployer(deploymentParameters, logger); #endif diff --git a/src/Microsoft.AspNet.Server.Testing/Deployers/IISDeployer.cs b/src/Microsoft.AspNet.Server.Testing/Deployers/IISDeployer.cs index 744c216dfd..db2fd224d4 100644 --- a/src/Microsoft.AspNet.Server.Testing/Deployers/IISDeployer.cs +++ b/src/Microsoft.AspNet.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.IO; using System.Linq; diff --git a/src/Microsoft.AspNet.Server.Testing/Deployers/IISExpressDeployer.cs b/src/Microsoft.AspNet.Server.Testing/Deployers/IISExpressDeployer.cs index a9aaea2a35..96f69b2b7f 100644 --- a/src/Microsoft.AspNet.Server.Testing/Deployers/IISExpressDeployer.cs +++ b/src/Microsoft.AspNet.Server.Testing/Deployers/IISExpressDeployer.cs @@ -92,10 +92,10 @@ namespace Microsoft.AspNet.Server.Testing AddEnvironmentVariablesToProcess(startInfo); // IIS express figures out the DNX from %PATH%. -#if DNX451 +#if NET451 SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", ChosenRuntimePath + ";" + startInfo.EnvironmentVariables["PATH"]); SetEnvironmentVariable(startInfo.EnvironmentVariables, "DNX_APPBASE", DeploymentParameters.ApplicationPath); -#elif DNXCORE50 +#elif DOTNET5_4 SetEnvironmentVariable(startInfo.Environment, "PATH", ChosenRuntimePath + ";" + startInfo.Environment["PATH"]); SetEnvironmentVariable(startInfo.Environment, "DNX_APPBASE", DeploymentParameters.ApplicationPath); #endif diff --git a/src/Microsoft.AspNet.Server.Testing/project.json b/src/Microsoft.AspNet.Server.Testing/project.json index 90279d5ecf..e3c02cd77b 100644 --- a/src/Microsoft.AspNet.Server.Testing/project.json +++ b/src/Microsoft.AspNet.Server.Testing/project.json @@ -1,36 +1,36 @@ { - "version": "1.0.0-*", - "description": "ASP.NET 5 helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing.", - "repository": { - "type": "git", - "url": "git://github.com/aspnet/hosting" + "version": "1.0.0-*", + "description": "ASP.NET 5 helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing.", + "repository": { + "type": "git", + "url": "git://github.com/aspnet/hosting" + }, + "dependencies": { + "Microsoft.AspNet.Testing": "1.0.0-*", + "Microsoft.Extensions.Logging.Abstractions": "1.0.0-*", + "Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*" + }, + "frameworks": { + "net451": { + "dependencies": { + "Microsoft.Web.Administration": "7.0.0" + }, + "frameworkAssemblies": { + "System.Net.Http": "", + "System.Xml": "" + } }, - "dependencies": { - "Microsoft.AspNet.Testing": "1.0.0-*", - "Microsoft.Extensions.Logging.Abstractions": "1.0.0-*", - "Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*" - }, - "frameworks": { - "dnx451": { - "dependencies": { - "Microsoft.Web.Administration": "7.0.0" - }, - "frameworkAssemblies": { - "System.Net.Http": "", - "System.Xml": "" - } - }, - "dnxcore50": { - "dependencies": { - "System.Diagnostics.Process": "4.0.0-beta-*", - "System.IO.FileSystem": "4.0.1-beta-*", - "System.Net.Http": "4.0.1-beta-*", - "System.Net.Primitives": "4.0.11-beta-*", - "System.Runtime.Extensions": "4.0.11-beta-*", - "System.Text.RegularExpressions": "4.0.11-beta-*", - "System.Threading": "4.0.11-beta-*", - "System.Threading.Thread": "4.0.0-*" - } - } + "dotnet5.4": { + "dependencies": { + "System.Diagnostics.Process": "4.0.0-beta-*", + "System.IO.FileSystem": "4.0.1-beta-*", + "System.Net.Http": "4.0.1-beta-*", + "System.Net.Primitives": "4.0.11-beta-*", + "System.Runtime.Extensions": "4.0.11-beta-*", + "System.Text.RegularExpressions": "4.0.11-beta-*", + "System.Threading": "4.0.11-beta-*", + "System.Threading.Thread": "4.0.0-*" + } } -} + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.TestHost/ResponseStream.cs b/src/Microsoft.AspNet.TestHost/ResponseStream.cs index a1dd0df091..314bbec048 100644 --- a/src/Microsoft.AspNet.TestHost/ResponseStream.cs +++ b/src/Microsoft.AspNet.TestHost/ResponseStream.cs @@ -169,7 +169,7 @@ namespace Microsoft.AspNet.TestHost _readLock.Release(); } } -#if DNX451 +#if NET451 public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { // TODO: This option doesn't preserve the state object. @@ -266,7 +266,7 @@ namespace Microsoft.AspNet.TestHost _writeLock.Release(); } } -#if DNX451 +#if NET451 public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { Write(buffer, offset, count); diff --git a/src/Microsoft.AspNet.TestHost/TestServer.cs b/src/Microsoft.AspNet.TestHost/TestServer.cs index 56dce2e74c..176431060c 100644 --- a/src/Microsoft.AspNet.TestHost/TestServer.cs +++ b/src/Microsoft.AspNet.TestHost/TestServer.cs @@ -9,7 +9,6 @@ using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting.Server; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Features; -using Microsoft.Dnx.Runtime.Infrastructure; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Microsoft.AspNet.TestHost/project.json b/src/Microsoft.AspNet.TestHost/project.json index 34769e53cd..20bd0b4016 100644 --- a/src/Microsoft.AspNet.TestHost/project.json +++ b/src/Microsoft.AspNet.TestHost/project.json @@ -1,24 +1,24 @@ { - "version": "1.0.0-*", - "description": "ASP.NET 5 web server for writing and running tests.", - "repository": { - "type": "git", - "url": "git://github.com/aspnet/hosting" + "version": "1.0.0-*", + "description": "ASP.NET 5 web server for writing and running tests.", + "repository": { + "type": "git", + "url": "git://github.com/aspnet/hosting" + }, + "dependencies": { + "Microsoft.AspNet.Hosting": "1.0.0-*" + }, + "frameworks": { + "net451": { + "frameworkAssemblies": { + "System.Net.Http": "" + } }, - "dependencies": { - "Microsoft.AspNet.Hosting": "1.0.0-*" - }, - "frameworks": { - "dnx451": { - "frameworkAssemblies": { - "System.Net.Http": "" - } - }, - "dnxcore50": { - "dependencies": { - "System.Diagnostics.Contracts": "4.0.1-beta-*", - "System.Net.Http": "4.0.1-beta-*" - } - } + "dotnet5.4": { + "dependencies": { + "System.Diagnostics.Contracts": "4.0.1-beta-*", + "System.Net.Http": "4.0.1-beta-*" + } } -} + } +} \ No newline at end of file