Skip to content

Commit 036f466

Browse files
authored
Add Wasm and MonoAOTLLVM to DotNetSdkVersionValidator (#2541)
* Add Wasm and MonoAOTLLVM plain moniker support to DotNetSdkVersionValidator. * Use Version directly rather than MSBuildMonikor.
1 parent 3062103 commit 036f466

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/BenchmarkDotNet/Validators/DotNetSdkVersionValidator.cs

+2
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,13 @@ private static string GetSdkVersionFromMoniker(RuntimeMoniker runtimeMoniker)
222222
RuntimeMoniker.Mono70 => "7.0",
223223
RuntimeMoniker.Mono80 => "8.0",
224224
RuntimeMoniker.Mono90 => "9.0",
225+
RuntimeMoniker.Wasm => Portability.RuntimeInformation.IsNetCore && CoreRuntime.TryGetVersion(out var version) ? $"{version.Major}.{version.Minor}" : "5.0",
225226
RuntimeMoniker.WasmNet50 => "5.0",
226227
RuntimeMoniker.WasmNet60 => "6.0",
227228
RuntimeMoniker.WasmNet70 => "7.0",
228229
RuntimeMoniker.WasmNet80 => "8.0",
229230
RuntimeMoniker.WasmNet90 => "9.0",
231+
RuntimeMoniker.MonoAOTLLVM => Portability.RuntimeInformation.IsNetCore && CoreRuntime.TryGetVersion(out var version) ? $"{version.Major}.{version.Minor}" : "6.0",
230232
RuntimeMoniker.MonoAOTLLVMNet60 => "6.0",
231233
RuntimeMoniker.MonoAOTLLVMNet70 => "7.0",
232234
RuntimeMoniker.MonoAOTLLVMNet80 => "8.0",

0 commit comments

Comments
 (0)