#1244 Disable restore on publish for integration tests

This commit is contained in:
Chris Ross (ASP.NET) 2017-10-27 12:20:13 -07:00
parent bc4a514d9e
commit 1e360cbb36
2 changed files with 7 additions and 1 deletions

View File

@ -88,6 +88,11 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
/// </summary>
public string AdditionalPublishParameters { get; set; }
/// <summary>
/// Publish restores by default, this property opts out by default.
/// </summary>
public bool RestoreOnPublish { get; set; }
/// <summary>
/// To publish the application before deployment.
/// </summary>

View File

@ -54,7 +54,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
var parameters = $"publish "
+ $" --output \"{DeploymentParameters.PublishedApplicationRootPath}\""
+ $" --framework {DeploymentParameters.TargetFramework}"
+ $" --configuration {DeploymentParameters.Configuration}";
+ $" --configuration {DeploymentParameters.Configuration}"
+ (DeploymentParameters.RestoreOnPublish ? "" : " --no-restore");
if (DeploymentParameters.ApplicationType == ApplicationType.Standalone)
{