diff --git a/src/Particular.PlatformSample/AppLauncher.cs b/src/Particular.PlatformSample/AppLauncher.cs index 4720180..8d96453 100644 --- a/src/Particular.PlatformSample/AppLauncher.cs +++ b/src/Particular.PlatformSample/AppLauncher.cs @@ -166,12 +166,14 @@ public void ServicePulse(int port, int serviceControlPort, int monitoringPort, s void StartProcess(string assemblyPath, Dictionary environmentVariables = null) { var workingDirectory = Path.GetDirectoryName(assemblyPath)!; - - var startInfo = new ProcessStartInfo("dotnet", assemblyPath) + var startInfo = new ProcessStartInfo("dotnet") { WorkingDirectory = workingDirectory, UseShellExecute = false }; + // Adding the assembly path to the argument list to prevent the path from being separated in to different arguments + // by the ProcessStartInfo constructor by spaces. + startInfo.ArgumentList.Add(assemblyPath); if (environmentVariables is not null) {