Skip to content
Merged
Show file tree
Hide file tree
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 utbot-rider/src/dotnet/UtBot/UtBot/ProcessWithRdServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ProcessWithRdServer
private Process _process;
private ILogger _logger = Logger.GetLogger<ProcessWithRdServer>();

public ProcessWithRdServer(string name, int port, string exePath, IShellLocks shellLocks, Lifetime? parent = null)
public ProcessWithRdServer(string name, string workingDir, int port, string exePath, IShellLocks shellLocks, Lifetime? parent = null)
{
using var blockingCollection = new BlockingCollection<String>(2);
shellLocks.AssertNonMainThread();
Expand All @@ -41,7 +41,9 @@ public ProcessWithRdServer(string name, int port, string exePath, IShellLocks sh
var wire = new SocketWire.Server(Lifetime, scheduler, socket);
var serializers = new Serializers();
var identities = new Identities(IdKind.Server);
var startInfo = new ProcessStartInfo("dotnet", $"{exePath} {port}");
var startInfo = new ProcessStartInfo("dotnet", $"\"{exePath}\" {port}");

startInfo.WorkingDirectory = workingDir;
Protocol = new Protocol(name, serializers, identities, scheduler, wire, Lifetime);
scheduler.Queue(() =>
{
Expand Down
4 changes: 2 additions & 2 deletions utbot-rider/src/dotnet/UtBot/UtBot/UnitTestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void Generate(IBackgroundProgressIndicator progressIndicator, IProject p
_logger.Catch(() =>
{
var port = NetworkUtil.GetFreePort();
var proc = new ProcessWithRdServer(VSharpMain.VSharpProcessName, port, vsharpRunner.FullPath,
var proc = new ProcessWithRdServer(VSharpMain.VSharpProcessName, project.ProjectFileLocation.FullPath, port, vsharpRunner.FullPath,
project.Locks,
_lifetime);
var projectCsprojPath = project.ProjectFileLocation.FullPath;
Expand Down Expand Up @@ -192,4 +192,4 @@ private static string calculateTestProjectTarget(TargetFrameworkId tfm)

return "net6.0";
}
}
}