From e67c82e7f2bdf5a1f11e6a4b89308793baf6d69e Mon Sep 17 00:00:00 2001 From: jhkimnew Date: Fri, 7 Oct 2016 10:15:17 -0700 Subject: [PATCH] Updated IISDeployer --- .../Deployers/IISDeployer.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISDeployer.cs index fc274b0fca..ecbdeb5500 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISDeployer.cs @@ -36,13 +36,15 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting _application = new IISApplication(DeploymentParameters, Logger); - // Publish to IIS root\application folder. - DotnetPublish(publishRoot: _application.WebSiteRootFolder); + if (DeploymentParameters.PublishApplicationBeforeDeployment) + { + DotnetPublish(publishRoot: _application.WebSiteRootFolder); + } // Drop a json file instead of setting environment variable. SetAspEnvironmentWithJson(); - var uri = TestUriHelper.BuildTestUri(); + var uri = TestUriHelper.BuildTestUri(DeploymentParameters.ApplicationBaseUriHint); lock (_syncObject) { @@ -112,7 +114,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting public void Deploy(Uri uri) { - _serverManager.Sites.Add(WebSiteName, _deploymentParameters.ApplicationPath, uri.Port); + var contentRoot = _deploymentParameters.PublishApplicationBeforeDeployment ? _deploymentParameters.PublishedApplicationRootPath : _deploymentParameters.ApplicationPath; + _serverManager.Sites.Add(WebSiteName, contentRoot, uri.Port); _serverManager.CommitChanges(); }