@@ -178,13 +178,17 @@ def build_and_run(coreclr_args, output_mch_name):
178
178
# Start with a "dotnet --info" to see what we've got.
179
179
run_command ([dotnet_exe , "--info" ])
180
180
181
- env_copy = os .environ .copy ()
181
+ tfm = "net9.0"
182
+ os .environ ["PERFLAB_TARGET_FRAMEWORKS" ] = tfm
183
+
184
+ env_for_restore = os .environ .copy ()
185
+
182
186
if is_windows :
183
187
# Try to work around problem with random NuGet failures in "dotnet restore":
184
188
# error NU3037: Package 'System.Runtime 4.1.0' from source 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json':
185
189
# The repository primary signature validity period has expired. [C:\h\w\A3B008C0\w\B581097F\u\performance\src\benchmarks\micro\MicroBenchmarks.csproj]
186
190
# Using environment variable specified in https://github.com/NuGet/NuGet.Client/pull/4259.
187
- env_copy ["NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY" ] = "9,2000"
191
+ env_for_restore ["NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY" ] = "9,2000"
188
192
189
193
# If `dotnet restore` fails, retry.
190
194
num_tries = 3
@@ -193,7 +197,7 @@ def build_and_run(coreclr_args, output_mch_name):
193
197
exit_on_fail = try_num + 1 == num_tries
194
198
(_ , _ , return_code ) = run_command (
195
199
[dotnet_exe , "restore" , project_file , "--packages" , artifacts_packages_directory ],
196
- _exit_on_fail = exit_on_fail , _env = env_copy )
200
+ _exit_on_fail = exit_on_fail , _env = env_for_restore )
197
201
if return_code == 0 :
198
202
# It succeeded!
199
203
break
@@ -203,7 +207,7 @@ def build_and_run(coreclr_args, output_mch_name):
203
207
204
208
run_command (
205
209
[dotnet_exe , "build" , project_file , "--configuration" , "Release" ,
206
- "--framework" , "net9.0" , "--no-restore" , "/p:NuGetPackageRoot=" + artifacts_packages_directory ,
210
+ "--framework" , tfm , "--no-restore" , "/p:NuGetPackageRoot=" + artifacts_packages_directory ,
207
211
"-o" , artifacts_directory ], _exit_on_fail = True )
208
212
209
213
# This is specifically for PowerShell.Benchmarks.
0 commit comments