Logging the dnx and dnu paths while running selfhost or dnu publish.
This commit is contained in:
parent
cd878d57c1
commit
df6f59a1d1
|
|
@ -78,11 +78,12 @@ namespace Microsoft.AspNet.Server.Testing
|
||||||
DeploymentParameters.DnxRuntime,
|
DeploymentParameters.DnxRuntime,
|
||||||
DeploymentParameters.PublishWithNoSource ? "--no-source" : string.Empty);
|
DeploymentParameters.PublishWithNoSource ? "--no-source" : string.Empty);
|
||||||
|
|
||||||
Logger.LogInformation("Executing command dnu {args}", parameters);
|
var dnuPath = Path.Combine(ChosenRuntimePath, "dnu.cmd");
|
||||||
|
Logger.LogInformation("Executing command {dnu} {args}", dnuPath, parameters);
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = Path.Combine(ChosenRuntimePath, "dnu.cmd"),
|
FileName = dnuPath,
|
||||||
Arguments = parameters,
|
Arguments = parameters,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
CreateNoWindow = true
|
CreateNoWindow = true
|
||||||
|
|
@ -91,6 +92,11 @@ namespace Microsoft.AspNet.Server.Testing
|
||||||
var hostProcess = Process.Start(startInfo);
|
var hostProcess = Process.Start(startInfo);
|
||||||
hostProcess.WaitForExit(60 * 1000);
|
hostProcess.WaitForExit(60 * 1000);
|
||||||
|
|
||||||
|
if (hostProcess.ExitCode != 0)
|
||||||
|
{
|
||||||
|
throw new Exception("dnu publish exited with exit code : {0}");
|
||||||
|
}
|
||||||
|
|
||||||
DeploymentParameters.ApplicationPath =
|
DeploymentParameters.ApplicationPath =
|
||||||
(DeploymentParameters.ServerType == ServerType.IISExpress ||
|
(DeploymentParameters.ServerType == ServerType.IISExpress ||
|
||||||
DeploymentParameters.ServerType == ServerType.IISNativeModule ||
|
DeploymentParameters.ServerType == ServerType.IISNativeModule ||
|
||||||
|
|
|
||||||
|
|
@ -48,11 +48,14 @@ namespace Microsoft.AspNet.Server.Testing
|
||||||
private CancellationToken StartSelfHost()
|
private CancellationToken StartSelfHost()
|
||||||
{
|
{
|
||||||
var commandName = DeploymentParameters.ServerType == ServerType.WebListener ? "web" : "kestrel";
|
var commandName = DeploymentParameters.ServerType == ServerType.WebListener ? "web" : "kestrel";
|
||||||
Logger.LogInformation("Executing dnx.exe {appPath} {command} --server.urls {url}", DeploymentParameters.ApplicationPath, commandName, DeploymentParameters.ApplicationBaseUriHint);
|
var dnxPath = Path.Combine(ChosenRuntimePath, "dnx.exe");
|
||||||
|
Logger.LogInformation("Executing {dnxexe} {appPath} {command} --server.urls {url}",
|
||||||
|
dnxPath, DeploymentParameters.ApplicationPath,
|
||||||
|
commandName, DeploymentParameters.ApplicationBaseUriHint);
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = Path.Combine(ChosenRuntimePath, "dnx.exe"),
|
FileName = dnxPath,
|
||||||
Arguments = string.Format("\"{0}\" {1} --server.urls {2}", DeploymentParameters.ApplicationPath, commandName, DeploymentParameters.ApplicationBaseUriHint),
|
Arguments = string.Format("\"{0}\" {1} --server.urls {2}", DeploymentParameters.ApplicationPath, commandName, DeploymentParameters.ApplicationBaseUriHint),
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
CreateNoWindow = true
|
CreateNoWindow = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue