File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/BenchmarkDotNet/Validators Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ public static IEnumerable<ValidationError> ValidateCoreSdks(string? customDotNet
3232
3333 public static IEnumerable < ValidationError > ValidateFrameworkSdks ( BenchmarkCase benchmark )
3434 {
35- var requiredSdkVersion = benchmark . GetRuntime ( ) . RuntimeMoniker . GetRuntimeVersion ( ) ;
35+ var targetRuntime = benchmark . Job . Environment . HasValue ( EnvironmentMode . RuntimeCharacteristic )
36+ ? benchmark . Job . Environment . Runtime
37+ : ClrRuntime . GetTargetOrCurrentVersion ( benchmark . Descriptor . WorkloadMethod . DeclaringType . Assembly ) ;
38+ var requiredSdkVersion = targetRuntime . RuntimeMoniker . GetRuntimeVersion ( ) ;
39+
3640 var installedVersionString = cachedFrameworkSdks . Value . FirstOrDefault ( ) ;
3741 if ( installedVersionString == null || Version . TryParse ( installedVersionString , out var installedVersion ) && installedVersion < requiredSdkVersion )
3842 {
You can’t perform that action at this time.
0 commit comments