Open Nepitwin opened 1 year ago
Not sure if it is a bug or not, but definitely expected behavior as for now. Since .NET COM interop doesn't support any kind of trimming or AOT.
It can be somewhat avoided by using <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
to the csproj.
But proper solution would be either wait until .NET 8/9 better support for COM or until we migrate current COM bindings to the our custom interop solution - MicroCOM.
.NET 8 previews is already shipping COM generators, I think we can make use of those generated code for the COM interop code.
Thanks for the information when I build the example with the parameter '
I thought it could be that it's not published as net6.0-windows but it's asweel crash.
However, it sounds good that for .Net 8 there might be a possibility.
Describe the bug When publishing a .Net Core desktop application, I noticed that the elements in the User Automation Interface Tree are no longer accessible when the Trim function is active.
If you build the GUI application without the trim function, the elements are accessible as expected.
It seems that .Net removes the test automation interfaces.
To Reproduce Steps to reproduce the behavior:
Expected behavior Automation interface should be still accessible by trimmed application.
Desktop (please complete the following information):