-
Notifications
You must be signed in to change notification settings - Fork 199
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
[ Microsoft.DotNet.ILCompiler ] "COM Interop is not supported on this platform" exception after updating to new version of package #399
Comments
Duplicate of #306 May also get addressed by AvaloniaUI/Avalonia#4971. cc @kekekeks @jkoritzinsky |
It's planned to replace all of Avalonia's COM interop with microcom, but I can't guarantee that it will be in 0.10.0 release, probably in 0.10.1-0.10.5 timeframe |
COM interop has not been supported by CoreRT so far. I suspect that it worked for you because of some second order effect, e.g. old version of Avalonia that did not have DragAndDrop support. |
No, it's not the case. The only line that was changed is <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="6.0.0-*" /> nothing more. You can check it by yourself if you run the sample. |
Diff for dependencies: https://www.diffchecker.com/cWLTuNsl I see nothing suspicious |
Thank you for providing a repro. This seems to be side-effect of bug fix #266 . Before this fix, the apartment state was not set correctly and drap&drop registration was silently failing due to this early out: https://github.com/AvaloniaUI/Avalonia/blob/0f65fadfd10d4c4544670b8a63d9e7638c9704c1/src/Windows/Avalonia.Win32/OleContext.cs#L39 After this fix, the apartment state is set correctly and drag&drop registration is failing with this exception. You can work around this by deleting |
Yay. Thank you. Fantastic - it works. |
The same issue as a previous one but now with MCVE. Well, not entirely but at least it's a runnable project.
Didn't change anything except
->
StackTrace
Repo with MCVE:
CoreRtAvaloniaMCVE
The text was updated successfully, but these errors were encountered: