CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.82k stars 1.37k forks source link

Exception thrown when using AdaptiveGridView or ListDetailsView in Project Reunion 0.8 RC #4078

Open sibille opened 3 years ago

sibille commented 3 years ago

Describe the bug

We're getting the following exception when adding an AdaptiveGridView or ListDetailsView to an app created with the Project Reunion 0.8 RC: Cannot find a resource with the given key: SystemControlBaseAcrylicBrush.'.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new WinUI 3 Desktop App using the Project Reunion 0.8 RC vsix (or use attached SampleApps)
  2. Add a AdaptiveGridView or ListDetailsView to the MainWindow.xaml
  3. Start the App
  4. See error
Exception thrown at 0x75AFA6F2 (KernelBase.dll) in AdaptiveGridViewExample.exe: WinRT originate error - 0x80131522 : 'Could not load type 'Microsoft.UI.Xaml.Media.AcrylicBackgroundSource' from assembly 'Microsoft.WinUI, Version=3.0.0.0, Culture=neutral, PublicKeyToken=de31ebe4ad15742b'.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!764DC743: (caller: 763ED256) ReturnHr(360) tid(5728) 8007007E The specified module could not be found.
Exception thrown at 0x75AFA6F2 (KernelBase.dll) in AdaptiveGridViewExample.exe: WinRT originate error - 0x80004005 : 'Cannot find a resource with the given key: SystemControlBaseAcrylicBrush.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!764DC743: (caller: 763ED256) ReturnHr(361) tid(5728) 8007007E The specified module could not be found.
Exception thrown at 0x75AFA6F2 in AdaptiveGridViewExample.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x0077E770.

or

Exception thrown at 0x75AFA6F2 (KernelBase.dll) in ListDetailsViewExample.exe: WinRT originate error - 0x80131522 : 'Could not load type 'Microsoft.UI.Xaml.Media.AcrylicBackgroundSource' from assembly 'Microsoft.WinUI, Version=3.0.0.0, Culture=neutral, PublicKeyToken=de31ebe4ad15742b'.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!764DC743: (caller: 763ED256) ReturnHr(360) tid(532c) 8007007E The specified module could not be found.
Exception thrown at 0x75AFA6F2 (KernelBase.dll) in ListDetailsViewExample.exe: WinRT originate error - 0x80004005 : 'Cannot find a resource with the given key: SystemControlBaseAcrylicBrush.'.
Exception thrown at 0x75AFA6F2 in ListDetailsViewExample.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x029BE470.

Environment

NuGet Package(s): CommunityToolkit.WinUI.UI.Controls

Package Version(s): 7.0.2

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [x] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

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

Additional context

Add any other context about the problem here.

AdaptiveGridViewExample.zip ListDetailsViewExample.zip

ghost commented 3 years ago

Hello sibille, 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 🙌

Kyaa-dost commented 3 years ago

@azchohfi anything missing here that is causing this error?

azchohfi commented 3 years ago

0.5 libraries are not compatible with 0.8, especially with the release candidate that has some nasty bugs. I have a local branch with 0.8 RC changes, but it is not in a state we want to ship. We'll ship a new version of the toolkit only when there is a 0.8-GA (not RC). That should not take long.

sibille commented 3 years ago

Awesome, thanks for the quick answer!