diff --git a/test/E2ETests/Common/DeploymentUtility.cs b/test/E2ETests/Common/DeploymentUtility.cs index 5946c518d6..e6d971b4bb 100644 --- a/test/E2ETests/Common/DeploymentUtility.cs +++ b/test/E2ETests/Common/DeploymentUtility.cs @@ -260,7 +260,7 @@ namespace E2ETests private static string SwitchPathToRuntimeFlavor(RuntimeFlavor runtimeFlavor, RuntimeArchitecture runtimeArchitecture, ILogger logger) { - var runtimePath = Environment.GetCommandLineArgs().First(); + var runtimePath = Process.GetCurrentProcess().MainModule.FileName; logger.LogInformation(string.Empty); logger.LogInformation("Current runtime path is : {0}", runtimePath);