Add generations TFMs to Hosting packages

This commit is contained in:
Pranav K 2015-10-22 08:52:05 -07:00
parent 8e946798a1
commit 47365e421f
11 changed files with 78 additions and 67 deletions

View File

@ -379,7 +379,7 @@ namespace Microsoft.AspNet.Hosting.Startup
private static string GenerateFooterEncoded(IRuntimeEnvironment environment) private static string GenerateFooterEncoded(IRuntimeEnvironment environment)
{ {
var runtimeType = HtmlEncodeAndReplaceLineBreaks(environment.RuntimeType); var runtimeType = HtmlEncodeAndReplaceLineBreaks(environment.RuntimeType);
#if DNXCORE50 #if DNXCORE50 || DOTNET5_4
var systemRuntimeAssembly = typeof(System.ComponentModel.DefaultValueAttribute).GetTypeInfo().Assembly; var systemRuntimeAssembly = typeof(System.ComponentModel.DefaultValueAttribute).GetTypeInfo().Assembly;
var assemblyVersion = new AssemblyName(systemRuntimeAssembly.FullName).Version.ToString(); var assemblyVersion = new AssemblyName(systemRuntimeAssembly.FullName).Version.ToString();
var clrVersion = HtmlEncodeAndReplaceLineBreaks(assemblyVersion); var clrVersion = HtmlEncodeAndReplaceLineBreaks(assemblyVersion);

View File

@ -31,12 +31,24 @@
"System.Runtime": "" "System.Runtime": ""
} }
}, },
"net451": {
"frameworkAssemblies": {
"System.Runtime": ""
}
},
"dnxcore50": { "dnxcore50": {
"dependencies": { "dependencies": {
"System.Console": "4.0.0-beta-*", "System.Console": "4.0.0-beta-*",
"System.Diagnostics.StackTrace": "4.0.1-beta-*", "System.Diagnostics.StackTrace": "4.0.1-beta-*",
"System.Reflection.Extensions": "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-*"
}
} }
} }
} }

View File

@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Server.Testing
else else
{ {
if (exception is HttpRequestException if (exception is HttpRequestException
#if DNX451 #if DNX451 || NET451
|| exception is System.Net.WebException || exception is System.Net.WebException
#endif #endif
) )

View File

@ -238,9 +238,9 @@ namespace Microsoft.AspNet.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 DOTNET5_4
startInfo.Environment; startInfo.Environment;
#endif #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) 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<string, string> environment, string name, string value) protected void SetEnvironmentVariable(System.Collections.Generic.IDictionary<string, string> environment, string name, string value)
{ {
#endif #endif

View File

@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Server.Testing
{ {
case ServerType.IISExpress: case ServerType.IISExpress:
return new IISExpressDeployer(deploymentParameters, logger); return new IISExpressDeployer(deploymentParameters, logger);
#if DNX451 #if NET451
case ServerType.IIS: case ServerType.IIS:
return new IISDeployer(deploymentParameters, logger); return new IISDeployer(deploymentParameters, logger);
#endif #endif

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.IO; using System.IO;
using System.Linq; using System.Linq;

View File

@ -92,10 +92,10 @@ namespace Microsoft.AspNet.Server.Testing
AddEnvironmentVariablesToProcess(startInfo); AddEnvironmentVariablesToProcess(startInfo);
// IIS express figures out the DNX from %PATH%. // IIS express figures out the DNX from %PATH%.
#if DNX451 #if NET451
SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", ChosenRuntimePath + ";" + startInfo.EnvironmentVariables["PATH"]); SetEnvironmentVariable(startInfo.EnvironmentVariables, "PATH", ChosenRuntimePath + ";" + startInfo.EnvironmentVariables["PATH"]);
SetEnvironmentVariable(startInfo.EnvironmentVariables, "DNX_APPBASE", DeploymentParameters.ApplicationPath); SetEnvironmentVariable(startInfo.EnvironmentVariables, "DNX_APPBASE", DeploymentParameters.ApplicationPath);
#elif DNXCORE50 #elif DOTNET5_4
SetEnvironmentVariable(startInfo.Environment, "PATH", ChosenRuntimePath + ";" + startInfo.Environment["PATH"]); SetEnvironmentVariable(startInfo.Environment, "PATH", ChosenRuntimePath + ";" + startInfo.Environment["PATH"]);
SetEnvironmentVariable(startInfo.Environment, "DNX_APPBASE", DeploymentParameters.ApplicationPath); SetEnvironmentVariable(startInfo.Environment, "DNX_APPBASE", DeploymentParameters.ApplicationPath);
#endif #endif

View File

@ -1,36 +1,36 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "ASP.NET 5 helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing.", "description": "ASP.NET 5 helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/aspnet/hosting" "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": { "dotnet5.4": {
"Microsoft.AspNet.Testing": "1.0.0-*", "dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*", "System.Diagnostics.Process": "4.0.0-beta-*",
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*" "System.IO.FileSystem": "4.0.1-beta-*",
}, "System.Net.Http": "4.0.1-beta-*",
"frameworks": { "System.Net.Primitives": "4.0.11-beta-*",
"dnx451": { "System.Runtime.Extensions": "4.0.11-beta-*",
"dependencies": { "System.Text.RegularExpressions": "4.0.11-beta-*",
"Microsoft.Web.Administration": "7.0.0" "System.Threading": "4.0.11-beta-*",
}, "System.Threading.Thread": "4.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-*"
}
}
} }
} }
}

View File

@ -169,7 +169,7 @@ namespace Microsoft.AspNet.TestHost
_readLock.Release(); _readLock.Release();
} }
} }
#if DNX451 #if NET451
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{ {
// TODO: This option doesn't preserve the state object. // TODO: This option doesn't preserve the state object.
@ -266,7 +266,7 @@ namespace Microsoft.AspNet.TestHost
_writeLock.Release(); _writeLock.Release();
} }
} }
#if DNX451 #if NET451
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{ {
Write(buffer, offset, count); Write(buffer, offset, count);

View File

@ -9,7 +9,6 @@ using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Hosting.Server; using Microsoft.AspNet.Hosting.Server;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Http.Features;
using Microsoft.Dnx.Runtime.Infrastructure;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;

View File

@ -1,24 +1,24 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "ASP.NET 5 web server for writing and running tests.", "description": "ASP.NET 5 web server for writing and running tests.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/aspnet/hosting" "url": "git://github.com/aspnet/hosting"
},
"dependencies": {
"Microsoft.AspNet.Hosting": "1.0.0-*"
},
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.Net.Http": ""
}
}, },
"dependencies": { "dotnet5.4": {
"Microsoft.AspNet.Hosting": "1.0.0-*" "dependencies": {
}, "System.Diagnostics.Contracts": "4.0.1-beta-*",
"frameworks": { "System.Net.Http": "4.0.1-beta-*"
"dnx451": { }
"frameworkAssemblies": {
"System.Net.Http": ""
}
},
"dnxcore50": {
"dependencies": {
"System.Diagnostics.Contracts": "4.0.1-beta-*",
"System.Net.Http": "4.0.1-beta-*"
}
}
} }
} }
}