Closed AigioL closed 2 years ago
It is impossible to disable COM for this library since it is a wrapper for the COM-based API for the Windows Task Scheduler from Microsoft.
You may be able to overcome this error by adding
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
to your PropertyGroup in your csproj file. If you are using PublishTrimmed, you will also need to add
<ItemGroup>
<TrimmerRootAssembly Include="Microsoft.Win32.TaskScheduler" />
</ItemGroup>
Is your feature request related to a problem? Please describe. Built-in COM incompatibilities trim https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/incompatibilities https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options
Describe the solution you'd like https://docs.microsoft.com/en-us/dotnet/standard/native-interop/com-wrappers Maybe you can refer to these changes https://github.com/dotnet/runtime/pull/54884
Additional context