Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Particular.PlatformSample/AppLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,14 @@ public void ServicePulse(int port, int serviceControlPort, int monitoringPort, s
void StartProcess(string assemblyPath, Dictionary<string, string> 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)
{
Expand Down