ApplicationDeployer: Supply the build configuration to dotnet publish

This commit is contained in:
Kiran Challa 2016-08-08 13:27:23 -07:00
parent e96f2cb738
commit 1aa5ebc585
2 changed files with 8 additions and 2 deletions

View File

@ -71,6 +71,11 @@ namespace Microsoft.AspNetCore.Server.Testing
public string TargetFramework { get; set; }
/// <summary>
/// Configuration under which to build (ex: Release or Debug)
/// </summary>
public string Configuration { get; set; } = "Debug";
/// <summary>
/// To publish the application before deployment.
/// </summary>

View File

@ -48,8 +48,9 @@ namespace Microsoft.AspNetCore.Server.Testing
DeploymentParameters.PublishedApplicationRootPath = publishRoot ?? Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
var parameters = $"publish \"{DeploymentParameters.ApplicationPath}\""
+ $" -o \"{DeploymentParameters.PublishedApplicationRootPath}\""
+ $" --framework {DeploymentParameters.TargetFramework}";
+ $" --output \"{DeploymentParameters.PublishedApplicationRootPath}\""
+ $" --framework {DeploymentParameters.TargetFramework}"
+ $" --configuration {DeploymentParameters.Configuration}";
Logger.LogInformation($"Executing command {DotnetCommandName} {parameters}");