-
-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot benchmark netcoreapp3.0 #2333
Comments
Hi @timcassell ! This error comes from the SDK, as far as I know there is nothing we can do about it on our side. Moreover, it seems to be related to netcoreapp2.0 version of the Unsafe package?
Which is not supported anymore, so I don't expect anyone to fix it on the SDK side. |
@adamsitnik If we really can't do anything about it, then core versions older than 3.1 should be removed. Otherwise, to make it work again, I think adding a netcoreapp2.0 BDN build target that uses older nuget package versions should do the trick. [Edit] Also the latest preview version of the |
@timcassell I think we can safely drop support of all .NET Core versions below 3.1 ("End of support" for 3.0 happened more than two years ago). Would you like to send a PR with proper fixes? |
@AndreyAkinshin Should we drop support for any core version below 6.0? Or only below 3.1? |
Only below 3.1. Typically, we try to support all the old runtimes while it doesn't require additional maintenance efforts. |
But people can still use 3.1 SDK and it should work just fine. My point is that if a newer SDK does not allow the users to build apps targeting older TFMs we can't do anything about it. But we should also not change the code, as people might still use older SDKs and everything should work fine. |
Using an older SDK doesn't make it work. It's a problem with the nuget package. I tried with sdk 3.0.103 and got the same error. |
@ViktorHofer does it mean that using newer version of packages like |
Yes that behavior was introduced with .NET 6 packages: dotnet/announcements#190
Note that the .NET 6 packages emitted an error when being consumed on an unsupported TFM. We then later changed that to a warning. |
How does that explain the issue? Netcoreapp3.0 implements netstandard2.0, which the net6 packages still support, so why does it not just consume the netstandard2.0 dlls rather than error? |
In the linked announcement it states that a .NET 6 package supports netcoreapp3.1, net5.0 and net6.0 but not netcoreapp3.0. Overall, netcoreapp3.0, netcoreapp3.1 and net5.0 are all out-of-support and shouldn't be used anymore. |
It also says that it supports netstandard2.0. |
While the package supports netstandard2.0, it explicitly lists the .NETCoreApp TFMs that are supported: netcoreapp3.1, net5.0 and net6.0. Please see open-telemetry/opentelemetry-dotnet#3448 which has much more information on that subject. |
Okay, from reading that over with more understanding of why netstandard2.0 is not actually supported for netcoreapp3.0, it seems we have 3 options here.
3 seems to be an unsafe option, as not everything is guaranteed to work. So really only 2 options. @AndreyAkinshin What do you think? [Edit] Or option 4 that I mentioned earlier, add a netcoreapp2.0 BDN build target that uses older nuget package versions |
Exactly, you don't want to go with option 3, as you are in untested territory. Regarding option 1 vs 2, I would recommend to drop out-of-support TFMs from the current release. If someone really must stay on an unsupported runtime (for whatever reason), they can do so an also stay on a previous released version of BenchmarkDotNet. The current (since the .NET 7 release) minimum supported frameworks are:
Just curious, why does BDN target .NET Standard? I would expect benchmark apps to target a specific runtime like .NET Framework or .NETCoreApp. |
I find it confusing, I would expect it to simply support only netcoreapp3.1, net5.0 and net6.0 in explicit way.
We support all runtimes and architectures and wanted to reduce the number of
I believe this is the way to go.
That is true, but on the other hand once in a while I need to find a version of .NET Core where perf change was introduced and I benchmark all of them. Once I find the version I user the profiler and disassembler plugins to understand what exactly has changed. These plugins are improving over time and work fine with older runtimes. Others often benchmark current vs old .NET version to show how it has changed over time. If they use an old BDN version it may not support current .NET version. So we are definitely going to keep .NET Standard 2.0 support for years to come. And live with the pain it causes to us ;) |
I got this error when trying to run a benchmark on
CoreRuntime.Core30
. Should BDN try to fix this and keep supporting older build targets, or just drop support?The text was updated successfully, but these errors were encountered: