Skip to content

Commit b9fc8e8

Browse files
committed
Fixing working directory
1 parent ad71a0f commit b9fc8e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BenchmarksServer/Startup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ private static async Task<Process> StartProcess(string hostname, string benchmar
22702270
{
22712271
Log.WriteLine($"Generating application host config for '{executable} {commandLine}'");
22722272

2273-
var apphost = GenerateApplicationHostConfig(job, "published", executable, commandLine, hostname);
2273+
var apphost = GenerateApplicationHostConfig(job, job.BasePath, executable, commandLine, hostname);
22742274
commandLine = $"-h \"{apphost}\"";
22752275
executable = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), @"System32\inetsrv\w3wp.exe");
22762276
}
@@ -2589,7 +2589,7 @@ private static void MarkAsRunning(string hostname, ServerJob job, Stopwatch stop
25892589
}
25902590
}
25912591

2592-
private static string GenerateApplicationHostConfig(ServerJob job, string benchmarksBin, string executable, string arguments,
2592+
private static string GenerateApplicationHostConfig(ServerJob job, string publishedFolder, string executable, string arguments,
25932593
string hostname)
25942594
{
25952595
void SetAttribute(XDocument doc, string path, string name, string value)
@@ -2609,7 +2609,7 @@ void SetAttribute(XDocument doc, string path, string name, string value)
26092609
SetAttribute(applicationHostConfig, "/configuration/system.webServer/aspNetCore", "processPath", executable);
26102610
SetAttribute(applicationHostConfig, "/configuration/system.webServer/aspNetCore", "arguments", arguments);
26112611

2612-
var ancmPath = Path.Combine(job.BasePath, benchmarksBin, "x64\\aspnetcorev2.dll");
2612+
var ancmPath = Path.Combine(publishedFolder, "x64\\aspnetcorev2.dll");
26132613
SetAttribute(applicationHostConfig, "/configuration/system.webServer/globalModules/add[@name='AspNetCoreModuleV2']", "image", ancmPath);
26142614

26152615
SetAttribute(applicationHostConfig, "/configuration/system.applicationHost/sites/site/bindings/binding", "bindingInformation", $"*:{job.Port}:");

0 commit comments

Comments
 (0)