dotnet / BenchmarkDotNet

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

Do not use Taskbar on Containers. #2546

Closed weidingerhp closed 4 months ago

weidingerhp commented 4 months ago

Experienced the following when running Benchmarks on Windows Containers with BenchmarkDotNet 0.13.8.

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {56FDF344-FD6D-11D0-958A-006097C9A090} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
at BenchmarkDotNet.Helpers.TaskbarProgressCom..cctor()
--- End of inner exception stack trace ---
at BenchmarkDotNet.Helpers.TaskbarProgressCom.SetState(IntPtr consoleWindowHandle, IntPtr consoleHandle, TaskbarProgressState taskbarState)
at BenchmarkDotNet.Helpers.TaskbarProgress.Dispose()
at BenchmarkDotNet.Running.BenchmarkRunnerClean.Run(BenchmarkRunInfo[] benchmarkRunInfos)
at BenchmarkDotNet.Running.BenchmarkRunner.RunWithDirtyAssemblyResolveHelper(BenchmarkRunInfo[] benchmarkRunInfos)
at BenchmarkDotNet.Running.BenchmarkRunner.<>c__DisplayClass5_0.<Run>b__0()
at BenchmarkDotNet.Running.BenchmarkRunner.RunWithExceptionHandling(Func`1 run)
at BenchmarkDotNet.Running.BenchmarkRunner.Run(BenchmarkRunInfo benchmarkRunInfo)

Setting the ENV-Variable should fix that issue.

timcassell commented 4 months ago

I think this should be fixed by #2255 (still waiting on review).

weidingerhp commented 4 months ago

I think this should be fixed by #2255 (still waiting on review).

Cool, thanks.

Sorry, but did not see your PR before.

weidingerhp commented 4 months ago

Closing because this should be fixed with #2255.