Addressed feedback

This commit is contained in:
Kiran Challa 2016-08-10 11:50:04 -07:00
parent cc65ddfa28
commit c6de61b520
2 changed files with 8 additions and 8 deletions

View File

@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.Testing
/// </summary>
public bool PublishApplicationBeforeDeployment { get; set; }
public bool DeletePublishedApplicationOnDispose { get; set; } = true;
public bool PreservePublishedApplicationForDebugging { get; set; } = false;
public ApplicationType ApplicationType { get; set; }

View File

@ -82,7 +82,13 @@ namespace Microsoft.AspNetCore.Server.Testing
protected void CleanPublishedOutput()
{
if (DeploymentParameters.DeletePublishedApplicationOnDispose)
if (DeploymentParameters.PreservePublishedApplicationForDebugging)
{
Logger.LogWarning(
"Skipping deleting the locally published folder as property " +
$"'{nameof(DeploymentParameters.PreservePublishedApplicationForDebugging)}' is set to 'true'.");
}
else
{
try
{
@ -94,12 +100,6 @@ namespace Microsoft.AspNetCore.Server.Testing
Logger.LogWarning($"Failed to delete directory : {exception.Message}");
}
}
else
{
Logger.LogWarning(
"Skipping deleting the locally published folder as property " +
$"'{nameof(DeploymentParameters.DeletePublishedApplicationOnDispose)}' is set to 'false'.");
}
}
protected void ShutDownIfAnyHostProcess(Process hostProcess)