@@ -112,7 +112,7 @@ internal static void SetEnvironmentVariables(this ProcessStartInfo start, Benchm
112112 SetClrEnvironmentVariables ( start , "Version" , clrRuntime . Version ) ;
113113
114114 if ( benchmarkCase . Job . Environment . Runtime is MonoRuntime monoRuntime && monoRuntime . MonoBclPath . IsNotBlank ( ) )
115- start . EnvironmentVariables [ "MONO_PATH" ] = monoRuntime . MonoBclPath ;
115+ start . Environment [ "MONO_PATH" ] = monoRuntime . MonoBclPath ;
116116
117117 if ( benchmarkCase . Config . HasPerfCollectProfiler ( ) )
118118 {
@@ -122,7 +122,7 @@ internal static void SetEnvironmentVariables(this ProcessStartInfo start, Benchm
122122 // enable BDN Event Source (https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/linux-performance-tracing.md#filtering)
123123 SetClrEnvironmentVariables ( start , "EventSourceFilter" , EngineEventSource . SourceName ) ;
124124 // workaround for https://github.com/dotnet/runtime/issues/71786, will be solved by next perf version
125- start . EnvironmentVariables [ "DOTNET_EnableWriteXorExecute" ] = "0" ;
125+ start . Environment [ "DOTNET_EnableWriteXorExecute" ] = "0" ;
126126 }
127127
128128 // corerun does not understand runtimeconfig.json files;
@@ -132,7 +132,7 @@ internal static void SetEnvironmentVariables(this ProcessStartInfo start, Benchm
132132 start . SetCoreRunEnvironmentVariables ( benchmarkCase , resolver ) ;
133133
134134 // disable ReSharper's Dynamic Program Analysis (see https://github.com/dotnet/BenchmarkDotNet/issues/1871 for details)
135- start . EnvironmentVariables [ "JETBRAINS_DPA_AGENT_ENABLE" ] = "0" ;
135+ start . Environment [ "JETBRAINS_DPA_AGENT_ENABLE" ] = "0" ;
136136
137137 if ( benchmarkCase . Job . ResolveValueAsNullable ( RunMode . RunStrategyCharacteristic ) != RunStrategy . ColdStart
138138 // CallCountingDelayMs=0 breaks DisassemblyDiagnoser, so we only set it if the job doesn't need disassembly. https://github.com/dotnet/runtime/issues/117339
@@ -145,7 +145,7 @@ internal static void SetEnvironmentVariables(this ProcessStartInfo start, Benchm
145145 return ;
146146
147147 foreach ( var environmentVariable in benchmarkCase . Job . Environment . EnvironmentVariables ?? [ ] )
148- start . EnvironmentVariables [ environmentVariable . Key ] = environmentVariable . Value ;
148+ start . Environment [ environmentVariable . Key ] = environmentVariable . Value ;
149149 }
150150
151151 // the code below was copy-pasted from https://github.com/dotnet/cli/blob/0bc24bff775e22352c2309ef990281280f92dbaa/test/Microsoft.DotNet.Tools.Tests.Utilities/Extensions/ProcessExtensions.cs#L13
@@ -267,8 +267,8 @@ private static void SetCoreRunEnvironmentVariables(this ProcessStartInfo start,
267267
268268 private static void SetClrEnvironmentVariables ( ProcessStartInfo start , string suffix , string value )
269269 {
270- start . EnvironmentVariables [ $ "DOTNET_{ suffix } "] = value ;
271- start . EnvironmentVariables [ $ "COMPlus_{ suffix } "] = value ;
270+ start . Environment [ $ "DOTNET_{ suffix } "] = value ;
271+ start . Environment [ $ "COMPlus_{ suffix } "] = value ;
272272 }
273273
274274#if ! NET5_0_OR_GREATER
0 commit comments