Skip to content

Commit

Permalink
Add Wasm and MonoAOTLLVM to DotNetSdkVersionValidator (#2541)
Browse files Browse the repository at this point in the history
* Add Wasm and MonoAOTLLVM plain moniker support to DotNetSdkVersionValidator.

* Use Version directly rather than MSBuildMonikor.
  • Loading branch information
LoopedBard3 authored Mar 10, 2024
1 parent 3062103 commit 036f466
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet/Validators/DotNetSdkVersionValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@ private static string GetSdkVersionFromMoniker(RuntimeMoniker runtimeMoniker)
RuntimeMoniker.Mono70 => "7.0",
RuntimeMoniker.Mono80 => "8.0",
RuntimeMoniker.Mono90 => "9.0",
RuntimeMoniker.Wasm => Portability.RuntimeInformation.IsNetCore && CoreRuntime.TryGetVersion(out var version) ? $"{version.Major}.{version.Minor}" : "5.0",
RuntimeMoniker.WasmNet50 => "5.0",
RuntimeMoniker.WasmNet60 => "6.0",
RuntimeMoniker.WasmNet70 => "7.0",
RuntimeMoniker.WasmNet80 => "8.0",
RuntimeMoniker.WasmNet90 => "9.0",
RuntimeMoniker.MonoAOTLLVM => Portability.RuntimeInformation.IsNetCore && CoreRuntime.TryGetVersion(out var version) ? $"{version.Major}.{version.Minor}" : "6.0",
RuntimeMoniker.MonoAOTLLVMNet60 => "6.0",
RuntimeMoniker.MonoAOTLLVMNet70 => "7.0",
RuntimeMoniker.MonoAOTLLVMNet80 => "8.0",
Expand Down

0 comments on commit 036f466

Please sign in to comment.