You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope to use except WinUI 3 part assemblies in UWP or Xaml islands
-----------------------------
希望能在 UWP 或 Xaml islands 中使用除 WinUI 3 之外的程序集
Currently in the new UWP with.native Aot .net 9, we can enable the UWP or Xaml islands toolchain with <UseUwp>true</UseUwp>. However, when the project wants to use some apis of the Windows App SDK, it encounters an error during compilation. At this time, if you want to reference the Windows App SDK assembly, you can only manually reference it, which is very inconvenient. I hope that an attribute can be provided in the future to solve this problem.
-----------------------------
目前在新的 UWP with .Native Aot .net 9 中,我们可以通过 <UseUwp>true</UseUwp> 来启用 UWP 或 Xaml islands 工具链。然而当项目想要使用 Windows App SDK 的一些 API 时,在编译时却遇到了错误,这时如果想要引用 Windows App SDK 程序集只能手动引用,这非常不方便,希望未来能提供一个属性以解决这一问题。
Error(错误)
Manual reference(手动引用)
Steps to reproduce the bug
See description
Expected behavior
See description
Screenshots
See description
NuGet package version
Windows App SDK 1.6.3: 1.6.241114003
Packaging type
Packaged (MSIX)
Windows version
Insider Build (xxxxx), Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
None
The text was updated successfully, but these errors were encountered:
"However, when I enabled this option, the error still occurred."
Ah, right, you're on 1.6.x, there was still that error back then. I plan on fixing it for 1.7 🙂
For now, you might be able to fix it if you manage to manually remove the Microsoft.WinUI.dll. Completely untested (and not supported), but try defining a target that runs before "CheckForInvalidWinUIReferenceInMixedScenarios", and remove Microsoft.WinUI.dll from @(ReferencePath). That in theory should fix that build error that checks for that reference.
"My project (Xaml islands) is running afoul of some WinUI 3 apis because it uses WinUI 2."
That is expected, given you're referencing the projections for both. You should be able to work around that by using an alias.
Describe the bug
Hope to use except WinUI 3 part assemblies in UWP or Xaml islands
-----------------------------
希望能在 UWP 或 Xaml islands 中使用除 WinUI 3 之外的程序集
Currently in the new UWP with.native Aot .net 9, we can enable the UWP or Xaml islands toolchain with
<UseUwp>true</UseUwp>
. However, when the project wants to use some apis of the Windows App SDK, it encounters an error during compilation. At this time, if you want to reference the Windows App SDK assembly, you can only manually reference it, which is very inconvenient. I hope that an attribute can be provided in the future to solve this problem.-----------------------------
目前在新的 UWP with .Native Aot .net 9 中,我们可以通过
<UseUwp>true</UseUwp>
来启用 UWP 或 Xaml islands 工具链。然而当项目想要使用 Windows App SDK 的一些 API 时,在编译时却遇到了错误,这时如果想要引用 Windows App SDK 程序集只能手动引用,这非常不方便,希望未来能提供一个属性以解决这一问题。Error(错误)
Manual reference(手动引用)
Steps to reproduce the bug
See description
Expected behavior
See description
Screenshots
See description
NuGet package version
Windows App SDK 1.6.3: 1.6.241114003
Packaging type
Packaged (MSIX)
Windows version
Insider Build (xxxxx), Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
None
The text was updated successfully, but these errors were encountered: