Skip to content

TaskbarProgressCom is not supported when benchmarking Native AOT #2253

Closed
@3steve3

Description

@3steve3

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:

Unhandled exception. System.TypeInitializationException: The type initializer for 'BenchmarkDotNet.Helpers.TaskbarProgressCom' threw an exception.
 ---> System.NotSupportedException: Built-in COM has been disabled via a feature switch. See https://aka.ms/dotnet-illink/com for more information.
   at BenchmarkDotNet.Helpers.TaskbarProgressCom..cctor()
   --- End of inner exception stack trace ---
   at BenchmarkDotNet.Helpers.TaskbarProgressCom.SetState(IntPtr consoleWindowHandle, IntPtr consoleHandle, TaskbarProgressState taskbarState)
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Run(BenchmarkRunInfo[] benchmarkRunInfos)
   at BenchmarkDotNet.Running.BenchmarkSwitcher.RunWithDirtyAssemblyResolveHelper(String[] args, IConfig config, Boolean askUserForInput)
   at BenchmarkDotNet.Running.BenchmarkSwitcher.Run(String[] args, IConfig config)
   at MyBenchmarks.Program.Main(String[] args) in C:\Users\Steve\source\repos\BenchmarkTesting\BenchmarkTesting\Program.cs:line 102

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions