dotnet / BenchmarkDotNet

Powerful .NET library for benchmarking
https://benchmarkdotnet.org
MIT License
10.47k stars 962 forks source link

Add Wasm and MonoAOTLLVM to DotNetSdkVersionValidator #2541

Closed LoopedBard3 closed 7 months ago

LoopedBard3 commented 7 months ago

Add Wasm and MonoAOTLLVM plain moniker support to DotNetSdkVersionValidator. I used the same check mentioned in the issue for determining the sdkversion, with an additional substring to remove the 'net' portion of the MsBuildMoniker (eg. net9.0). Tested locally for MonoAOTLLVM successfully.

Fix: #2540

timcassell commented 7 months ago

I think we should use the version of the runtime rather than the MsBuildMoniker. CoreRuntime.TryGetVersion That way we can be sure we're not getting something like net8.0-windows or netcoreapp3.1 and we can make sure it's using a supported version (3.1 should be bumped up to 5.0/6.0). Now that I mention it, the config parser doesn't enforce the minimum version there either, so it would probably just explode if the host version is too old (do we care, though?).

LoopedBard3 commented 7 months ago

Updated and tested locally for MonoAOTLLVM successfully.