-
Notifications
You must be signed in to change notification settings - Fork 105
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
Bug: MarshalInspectable.CreateMarshaler exhibits different behaviors and results in UWP and WinUI 3 #1846
Comments
You're likely using WinUI 3 without enabling |
Add |
Nowhere. When I turned on aot in the winui3 project, it did throw the same exceptions as the uwp project. So do you have a solution for non-dynamic code? Thank you very much ----------------------------------------确实。当我在winui3项目中开启了aot后发现它确实抛出了和uwp项目一样的异常。所以想问一下您有针对非动态代码的解决方案吗?非常感谢 |
Nope, it's just unsupported. |
All right. I can now do this only by temporarily replacing the generic TypedEventHandler with a non-generic EventHandler. ----------------------------------------好吧。我现在只能用非泛型的 EventHandler 临时替代泛型的 TypedEventHandler 来完成这一任务了。 |
Description
MarshalInspectable.CreateMarshaler exhibits different behaviors and results in UWP and WinUI 3
------------------------------------------
MarshalInspectable.CreateMarshaler 在 UWP 和 WinUI 3 中表现出不同的行为和结果
Steps To Reproduce
------------------------------------------
1.创建 WinUI 3 和 UWP 空白项目,项目使用的配置: .NET 9 rc 2,CsWinRT 2.1.6,Windows App SDK 1.6.240923002
2.应用初始化完成后,添加如下代码
3.在 UWP 中发生了异常,WinUI 3 项目顺利执行。
Expected Behavior
The above types of code will hopefully be called smoothly in UWP as well
------------------------------------------
上述类型代码希望也可以在 UWP 中顺利调用
Version Info
CsWinRT 2.1.6
.NET 9 RC2
Windows App SDK 1.6.240923002
Visual Studio 2022 17.12.preview 4.0
Additional Context
ScreenShot(截图)
------------------------------------------
UWP
------------------------------------------
WinUI 3
The text was updated successfully, but these errors were encountered: