Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Updated IISDeployer #860

Merged
merged 1 commit into from
Oct 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ public override DeploymentResult Deploy()

_application = new IISApplication(DeploymentParameters, Logger);

// Publish to IIS root\application folder.
DotnetPublish(publishRoot: _application.WebSiteRootFolder);
if (DeploymentParameters.PublishApplicationBeforeDeployment)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you always have to publish to run? I think we always publish for express.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeploymentParameters.PublishApplicationBeforeDeployment is set to true at the line 35.
So, adding this if condition would not affect any change. IISExpress has the same code logic.

{
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)
{
Expand Down Expand Up @@ -112,7 +114,8 @@ public IISApplication(DeploymentParameters deploymentParameters, ILogger logger)

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();
}

Expand Down