diff --git a/build.cake b/build.cake index 786cd32a699..3f2e52ba527 100644 --- a/build.cake +++ b/build.cake @@ -345,9 +345,15 @@ void RunMutationTests(FilePath target, FilePath testProject) Information($"Running mutation tests for '{targetFileName}'. Test Project: '{testProject}'"); - var args = $"stryker --project {targetFileName} --test-project {testProject.FullPath} --break-at {score} --config-file {strykerConfigPath} --output {strykerOutput}/{targetFileName}"; + var args = $"stryker --project {targetFileName} --test-project {testProject.GetFilename()} --break-at {score} --config-file {strykerConfigPath} --output {strykerOutput}/{targetFileName}"; + + var testProjectDir = testProject.GetDirectory(); + var result = StartProcess("dotnet", new ProcessSettings + { + Arguments = args, + WorkingDirectory = testProjectDir.FullPath, + }); - var result = StartProcess("dotnet", args); if (result != 0) { throw new InvalidOperationException($"The mutation testing of '{targetFileName}' project failed.");