diff --git a/.gitignore b/.gitignore index ac82da75..58ebbb8f 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ nuget.exe *.ipch *.sln.ide project.lock.json +/.vs/ diff --git a/src/Microsoft.AspNet.Server.Testing/Deployers/MonoDeployer.cs b/src/Microsoft.AspNet.Server.Testing/Deployers/MonoDeployer.cs index df44e88e..4b8a17eb 100644 --- a/src/Microsoft.AspNet.Server.Testing/Deployers/MonoDeployer.cs +++ b/src/Microsoft.AspNet.Server.Testing/Deployers/MonoDeployer.cs @@ -62,13 +62,14 @@ namespace Microsoft.AspNet.Server.Testing throw new InvalidOperationException("kestrel is the only valid ServerType for Mono"); } - Logger.LogInformation("Executing command: dnx \"{appPath}\" kestrel --server.urls {url}", - DeploymentParameters.ApplicationPath, DeploymentParameters.ApplicationBaseUriHint); + var dnxArgs = $"--appbase \"{DeploymentParameters.ApplicationPath}\" Microsoft.Framework.ApplicationHost kestrel --server.urls {DeploymentParameters.ApplicationBaseUriHint}"; + + Logger.LogInformation("Executing command: dnx {dnxArgs}", dnxArgs); var startInfo = new ProcessStartInfo { FileName = "dnx", - Arguments = string.Format("\"{0}\" kestrel --server.urls {1}", DeploymentParameters.ApplicationPath, DeploymentParameters.ApplicationBaseUriHint), + Arguments = dnxArgs, UseShellExecute = false, CreateNoWindow = true, RedirectStandardInput = true diff --git a/src/Microsoft.AspNet.Server.Testing/Deployers/SelfHostDeployer.cs b/src/Microsoft.AspNet.Server.Testing/Deployers/SelfHostDeployer.cs index e23ae53c..58c1c942 100644 --- a/src/Microsoft.AspNet.Server.Testing/Deployers/SelfHostDeployer.cs +++ b/src/Microsoft.AspNet.Server.Testing/Deployers/SelfHostDeployer.cs @@ -49,14 +49,13 @@ namespace Microsoft.AspNet.Server.Testing { var commandName = DeploymentParameters.ServerType == ServerType.WebListener ? "web" : "kestrel"; var dnxPath = Path.Combine(ChosenRuntimePath, "dnx.exe"); - Logger.LogInformation("Executing {dnxexe} {appPath} {command} --server.urls {url}", - dnxPath, DeploymentParameters.ApplicationPath, - commandName, DeploymentParameters.ApplicationBaseUriHint); + var dnxArgs = $"--appbase \"{DeploymentParameters.ApplicationPath}\" Microsoft.Framework.ApplicationHost {commandName} --server.urls {DeploymentParameters.ApplicationBaseUriHint}"; + Logger.LogInformation("Executing {dnxexe} {dnxArgs}", dnxPath, dnxArgs); var startInfo = new ProcessStartInfo { FileName = dnxPath, - Arguments = string.Format("\"{0}\" {1} --server.urls {2}", DeploymentParameters.ApplicationPath, commandName, DeploymentParameters.ApplicationBaseUriHint), + Arguments = dnxArgs, UseShellExecute = false, CreateNoWindow = true, RedirectStandardError = true,