From 36bede16e94d773e747dd75696616d9fc12ed7e0 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 3 Oct 2017 16:43:12 -0700 Subject: [PATCH] Remove check for using ANCM with Win7. (#1235) --- .../Deployers/IISExpressDeployer.cs | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs index f1116f7771..077c4851db 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs @@ -109,26 +109,18 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting if (serverConfig.Contains("[ANCMPath]")) { string ancmPath; - if (!IsWin8OrLater) + // We need to pick the bitness based the OS / IIS Express, not the application. + // We'll eventually add support for choosing which IIS Express bitness to run: https://github.com/aspnet/Hosting/issues/880 + var ancmFile = Is64BitHost ? "aspnetcore_x64.dll" : "aspnetcore_x86.dll"; + // Bin deployed by Microsoft.AspNetCore.AspNetCoreModule.nupkg + if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr + && DeploymentParameters.ApplicationType == ApplicationType.Portable) { - // The nupkg build of ANCM does not support Win7. https://github.com/aspnet/AspNetCoreModule/issues/40. - ancmPath = @"%ProgramFiles%\IIS Express\aspnetcore.dll"; + ancmPath = Path.Combine(contentRoot, @"runtimes\win7\native\", ancmFile); } else { - // We need to pick the bitness based the OS / IIS Express, not the application. - // We'll eventually add support for choosing which IIS Express bitness to run: https://github.com/aspnet/Hosting/issues/880 - var ancmFile = Is64BitHost ? "aspnetcore_x64.dll" : "aspnetcore_x86.dll"; - // Bin deployed by Microsoft.AspNetCore.AspNetCoreModule.nupkg - if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr - && DeploymentParameters.ApplicationType == ApplicationType.Portable) - { - ancmPath = Path.Combine(contentRoot, @"runtimes\win7\native\", ancmFile); - } - else - { - ancmPath = Path.Combine(contentRoot, ancmFile); - } + ancmPath = Path.Combine(contentRoot, ancmFile); } if (!File.Exists(Environment.ExpandEnvironmentVariables(ancmPath)))