dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

The target object with name 'ExpandCollapseChevronIcon' could not be resolved for a Setter. #23938

Open voroninp opened 1 month ago

voroninp commented 1 month ago

Description

I am playing with the samples for Shell: Xaminals solution. I build app in Debug config and target Windows (net8.0-windows10.0.19041.0).

While clicking on various items of the menu, I sometimes get the following error:

No installed components were detected. The target object with name 'ExpandCollapseChevronIcon' could not be resolved for a Setter.

I also see a binding error:

Error 1 Microsoft.UI.Xaml.Controls.SplitView TemplateSettings.CompactPaneGridLength Microsoft.UI.Xaml.Media.Animation.SplineDoubleKeyFrame.Value Double Converter failed to convert value of type 'Windows.Foundation.IReference`1' to type 'Double'

image image

'Xaminals.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.7\System.Net.NetworkInformation.dll'. Symbol loading disabled by Include/Exclude setting. Exception thrown: 'System.ArgumentException' in WinRT.Runtime.dll WinRT information: Assets/Fonts/Segoe UI.ttf is not a valid absolute URI. Exception thrown: 'System.ArgumentException' in WinRT.Runtime.dll WinRT information: Assets/Fonts/Segoe UI.otf is not a valid absolute URI. Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Error: Converter failed to convert value of type 'Windows.Foundation.IReference`1' to type 'Double'; BindingExpression: Path='TemplateSettings.CompactPaneGridLength' DataItem='Microsoft.UI. Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll 'Xaminals.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.NetCoreApp.dll'.

Steps to Reproduce

I have no clue how to reproduce it with 100% guarantee. I jsut keep clicking menu items. So far the sequence of actions seems to be the following (see the attached gif as well) FailingShell :

  1. Start the app
  2. Select Domestic -> Dogs -> Afghan Hound
  3. Click on the Navigation and select About menu item.
  4. Clikc on the Navigation and select Domestic
  5. Open the menu for Domestic and move cursor to Cats, wait for a second... you are welcome.

I can reproduce it even if I target net8.0-windows10.0.22621.0

Actually, on the very first build, when no app store app is installed, I simply see this screen: image And debug output shows:

09:37:24:123 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:123 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:123 Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll 09:37:24:123 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:123 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:123 Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll 09:37:24:373 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:373 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:373 Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll 09:37:24:373 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:373 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in Microsoft.Maui.dll 09:37:24:621 Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll

When I close th window I expect application to exit but it keeps running in Background Processes section of Task Explorer: image

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main/8.0/Fundamentals/Shell

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kevinxufei commented 1 month ago

This issue has been verified using Visual Studio 17.11.0 Preview 6.0 (8.0.71 & 8.0.60). Can repro on Windows platform with sample project.