CommunityToolkit / Windows

Collection of controls for WinUI 2, WinUI 3, and Uno Platform developers. Simplifies and demonstrates common developer tasks building experiences for Windows with .NET.
https://aka.ms/windowstoolkitdocs
Other
590 stars 74 forks source link

CommunityToolkit.WinUI.xxx 8.1.240916 issue #543

Open JLBLU opened 2 months ago

JLBLU commented 2 months ago

Describe the bug

Hi,

After installation of CommunityToolkit.WinUI.xxx (*) new versions (from 8.1.240821 to 8.1.240916), following issue occurs during execution :

Microsoft.UI.Xaml.Markup.XamlParseException : 'The text associated with this error code could not be found.'

Failed to assign to property 'Microsoft.UI.Xaml.Controls.ItemsControl.ItemsSource'. [Line: 968 Position: 37]'

    //

    public DkItemLinksPage()
    {
        **this.InitializeComponent();**

... ///

/// InitializeComponent() /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.UI.Xaml.Markup.Compiler"," 3.0.0.2408")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void InitializeComponent() { if (_contentLoaded) return;

        _contentLoaded = true;

        global::System.Uri resourceLocator = new global::System.Uri("ms-appx:///Views/DkItemLinksPage.xaml");
        **global::Microsoft.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Microsoft.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);**
    }

(*) CommunityToolkit.WinUI.Extensions + .Helpers + .Controls.TabbedCommandBar + .Controls.Sizers + .Controls.RadialGauge + .Controls.Primitives + + .Controls.layoutTransformControl + .Controls.Sizers + .Controls.Behaviors

// Also warning :

DEP0840: Project 'XXXXX' `requires packages 'MicrosoftCorporationII.WinAppRuntime.Main.1.6_8wekyb3d8bbwe' and 'MicrosoftCorporationII.WinAppRuntime.Singleton_8wekyb3d8bbwe' with version version >= « 6000.242.101.0 ».. These packages should be installed on first run, if not please visit http://go.microsoft.com/fwlink/?linkid=2222757 for installation instructions. (despite several clean+rebuild)

//

WinExe net8.0-windows10.0.26100.0 10.0.17763.0 10.0.22621.38 app.manifest x64 win-x64 win-$(Platform).pubxml true best regards, Jean-Luc ### Regression CommunityToolkit.WinUI.xxx 8.1.240821 ### Reproducible in sample app? - [ ] This bug can be reproduced in the sample app. ### Steps to reproduce ```text Navigate to page case "DkItemLink": DkItemLinksPage.SetParentInfos(item, arrayTabLinksLib); DkItemFrame.Navigate(typeof(DkItemLinksPage), this, navOptions.TransitionInfoOverride); ToolTipService.SetToolTip(btnRemove, "Suppression" + Environment.NewLine + " ligne"); ToolTipService.SetPlacement(btnRemove, PlacementMode.Bottom); break; / Page contains controls : Grid, DockPanel, AppBarButton, TextBlock, StackPanel, PasswordBox, TextBox, ComboBox, ScrollViewer, GridSplitter, DataGrid, DataGridTemplateColumn ``` ### Expected behavior Cannot load screen. Contains controls : Grid, DockPanel, AppBarButton, TextBlock, StackPanel, PasswordBox, TextBox, ComboBox, ScrollViewer, GridSplitter, DataGrid, DataGridTemplateColumn ### Screenshots ![image](https://github.com/user-attachments/assets/4f7e39a0-b2fb-4d74-b96f-a903ae0b3676) ### Windows Build Number - [ ] Windows 10 1809 (Build 17763) - [ ] Windows 10 1903 (Build 18362) - [ ] Windows 10 1909 (Build 18363) - [ ] Windows 10 2004 (Build 19041) - [ ] Windows 10 20H2 (Build 19042) - [ ] Windows 10 21H1 (Build 19043) - [ ] Windows 11 21H2 (Build 22000) - [X] Other (specify) ### Other Windows Build number Windows 11 23H2 Build 22631.4169 ### App minimum and target SDK version - [ ] Windows 10, version 1809 (Build 17763) - [ ] Windows 10, version 1903 (Build 18362) - [ ] Windows 10, version 1909 (Build 18363) - [ ] Windows 10, version 2004 (Build 19041) - [X] Other (specify) ### Other SDK version target SDK version 10.0.621.0 ### Visual Studio Version _No response_ ### Visual Studio Build Number Microsoft Visual Studio Community 2022 (64 bits) - Current Version 17.11.3 ### Device form factor Desktop ### Nuget packages CommunityToolkit.WinUI.xxx (*) new versions 8.1.240916 (*) CommunityToolkit.WinUI.Extensions + .Helpers + .Controls.TabbedCommandBar + .Controls.Sizers + .Controls.RadialGauge + .Controls.Primitives + + .Controls.layoutTransformControl + .Controls.Sizers + .Controls.Behaviors + CommunityToolkit.Mvvm 8.3.1 + Microsoft.WindowsAppSDK 1.6.240829007 ### Additional context _No response_ ### Help us help you No.
DominikErnst commented 2 months ago

Same here ...

Warning DEP0840: Project 'CTI2' requires packages 'MicrosoftCorporationII.WinAppRuntime.Main.1.6_8wekyb3d8bbwe' and 'MicrosoftCorporationII.WinAppRuntime.Singleton_8wekyb3d8bbwe' with version >= '6000.242.101.0'. These packages should be installed on first run, if not please visit http://go.microsoft.com/fwlink/?linkid=2222757 for installation instructions. CTI2

`<?xml version="1.0" encoding="utf-8"?>

WinExe net8.0-windows10.0.19041.0 10.0.17763.0 CTI2 Assets/WindowIcon.ico app.manifest AnyCPU;x64;x86 win-x86;win-x64;win-arm64 win10-x86;win10-x64;win10-arm64 Properties\PublishProfiles\win10-$(Platform).pubxml enable enable 10.0.19041.38 true true true 10.0.19041.38 538396775AC04C2F949B13EC21563E4CC9F39D2D True 10.0.18362.0 Always MSBuild:Compile MSBuild:Compile MSBuild:Compile MSBuild:Compile true

`

When I compile the app, the warning is gone, only when I start the app does the warning reappear.

tiara-kastner-fhooe commented 1 week ago

Hello there,

I am using Windows 10 22H2 with VisualStudio 2022 17.11.5 x64 and dotnet 8.0.10 and windows app sdk 1.6.1.

I had the same issue with WinUI3 in general. I had my VisualStudio 2022 running in admin mode which was the culprit for me. Once i launched everything in a normal user context without elevated permissions, it started working again.

Maybe that will do as a workaround for you.

Arlodotexe commented 1 week ago

This seems like the error we encountered in https://github.com/CommunityToolkit/Windows/issues/516, which ended up being a platform issue.

@JLBLU Could you please try updating to the latest Preview Packages on the MainLatest feed and see if that resolves your issue?

JLBLU commented 1 day ago

Hi @Arlodotexe

For example, I have no issue with CommunityToolkit.Mvvm 8.2.1 and issue occurs with 8.2.2, even with last version 8.4.0 preview 2