-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
TaskbarProgressCom is not supported when benchmarking Native AOT #2253
Comments
Hi @3steve3 How do you run your benchmarks? I would expect your host process (what you start from command line) to be non-NativeAOT and work fine, while the benchmark process that does not use the taskbar be NativeAOT and also work fine. |
@adamsitnik I'm using this command |
Based on https://stackoverflow.com/questions/68110207/system-notsupportedexception-in-taskscheduler-when-using-publishtrimmed-net6-0 I suspect that something sets If it does not help could you please try downloading our samples and running them?
it works fine on my machine: |
I was able to repro by adding |
@adamsitnik Fixed in #2255. |
I hit the same issue in my csproj:
Worked around it by commenting out the |
Seriously? You "fix" the bug by not doing what you originally wanted to do? Is BenchmarkDotNet even compatible with AOT? How can I proceed with this exception? I really don't care about taskbar progress. I just want to run realistic benchmarks. Maybe I'll have to run my own Stopwatch loop again. It wasn't that bad last time. Actually I was also interested in memory consumption results. |
@ygoe What do you mean? Did you try the nightly build with the fix? |
What I mean is: My application runs with PublishAOT and I'd like to benchmark two possible implementations of something I want to do in there. To get realistic results, I'm interested in the benchmark running the AOT-compiled code, not the JITed code. I'm running this from Visual Studio in Release mode. It opens by default in the Windows Terminal app here on Windows 11. I've used the public NuGet package. |
The fix is not on public nuget yet. You will need to use the nightly version to get the fix. https://benchmarkdotnet.org/articles/guides/nuget.html#nightly |
It appears that https://github.com/dotnet/BenchmarkDotNet/blob/master/src/BenchmarkDotNet/Helpers/Taskbar/TaskbarProgress.cs is using COM Interop, and it not supported by default when using Native AOT.
The output that I'm getting is:
The text was updated successfully, but these errors were encountered: