CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
384 stars 89 forks source link

C++/Native projects can't be launched/crash at launch if packaged by MSIX (Official sample breakage) #330

Open Code-ScottLe opened 2 years ago

Code-ScottLe commented 2 years ago

Describe the bug

Any packaged C++/Native application that use XAML islands will crash/break at launch with an error dialog from Visual C++ Runtime Library, noting that abort() has been called.

Further debugging got the following error in the debug output:

mincore\com\oleaut32\dispatch\ups.cpp(2122)\OLEAUT32.dll!00007FFAF84F9DD6: (caller: 00007FFAF84F91E9) ReturnHr(1) tid(69c0) 8002801D Library not registered.

Exception thrown at 0x00007FFAF7C24F99 (KernelBase.dll) in MyDesktopWin32App.exe: WinRT originate error - 0x80004005 : 'Cannot locate resource from 'ms-appx:///MyUserControl.xaml'.'.

Exception thrown at 0x00007FFAF7C24F99 in MyDesktopWin32App.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x0000002D8F57DF28.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Clone https://github.com/microsoft/Xaml-Islands-Samples
  2. Launch VS with NativeXamlIslands.sln
  3. Set SampleCppApp.Package as start up project
  4. Build and launch
  5. Observe error.

Expected behavior

Expected to be able to launch application but unable to.

Screenshots

If applicable, add screenshots to help explain your problem. image

Environment

NuGet Package(s): 
latest 6.1.x

Package Version(s): 

Project .NET Version:
- [ ] .NET Framework (version: )
- [ ] .NET Core 3
- [ ] .NET Core 3.1 Preview (version: )

Windows 10 Build Number:
- Windows 10 21H1

App min and target version:
- 19041

Device form factor:
- [x] Desktop

Visual Studio 
- [ ] 2017 (version: )
- [x ] 2019 (version: latest) 
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

ghost commented 2 years ago

Hello Code-ScottLe, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback πŸ™Œ

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

HepsibaPedada commented 2 years ago

I am able to resolve this problem by adding app.manifest file with the following content: The trickier part is the file contains xml content but it's extension is not .xml the extension is .manifest itself.

<?xml version="1.0" encoding="UTF-8"?>

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention πŸ‘‹" due to no activity for 15 days. Please triage the issue so the fix can be established.