WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

[DataGrid] 'Unable to find a type named 'Microsoft.UI.Xaml.WindowChrome' Exception when click on a row

Open djonasdev opened this issue 1 year ago • 3 comments

Describe the bug

When I click on a line, the application crashes immediately.

The last major change to my application was updating the windows sdk to v1.1.0 Before that I had v1.0.3 and with this everything was still working.

Regression

No response

Reproducible in sample app?

  • [ ] This bug can be reproduced in the sample app.

Steps to reproduce

Use my csproj file, add some dummy data and try yourself.

Expected behavior

No crash

Screenshots

DataGrid

grafik

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)
  • [X] Windows 10 21H1 (Build 19043)
  • [ ] Windows 11 21H2 (Build 22000)
  • [ ] Other (specify)

Other Windows Build number

No response

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)
  • [ ] Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

17.2.4

Device form factor

Desktop

Nuget packages

No response

Additional context

*.csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows10.0.18362.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
    <RootNamespace>Haprotec.WinUI.UI.ControlStation</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;arm64</Platforms>
    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
    <PublishProfile>win10-$(Platform).pubxml</PublishProfile>
    <UseWinUI>true</UseWinUI>
    <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
    <WindowsPackageType>None</WindowsPackageType>
    <SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion>

  </PropertyGroup>
  <PropertyGroup>
    <!--https://github.com/dotnet/maui/issues/5886-->
    <WinUISDKReferences>false</WinUISDKReferences>
    <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
    <GenerateLibraryLayout>true</GenerateLibraryLayout>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
    <PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
    <PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
    <PackageReference Include="HtOPC.Local" Version="3.2.0" />
    <PackageReference Include="Lamar" Version="8.0.1" />
    <PackageReference Include="Lamar.Microsoft.DependencyInjection" Version="8.0.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.5" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
    <PackageReference Include="NLog.Extensions.Hosting" Version="5.0.1" />
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.0" />
    <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.1" />
    <PackageReference Include="NLog" Version="5.0.1" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
    <PackageReference Include="ReactiveUI" Version="18.0.10" />
    <PackageReference Include="ReactiveUI.Fody" Version="18.0.10" />
    <PackageReference Include="ReactiveUI.WinUI" Version="18.0.10" />
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>

Help us help you

No.

djonasdev avatar Jul 06 '22 14:07 djonasdev

Hello dojo90, 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 avatar Jul 06 '22 14:07 ghost

@dojo90 we haven't changed any code in the Toolkit here, so if it was working with 1.0.3 and crashing in 1.1.1 this seems like a regression in the WindowsAppSDK/WinUI 3. They just released 1.1.2, do you see it there as well?

If so, having a stand-alone project which works in 1.0.3 but then crashes in 1.1.x would be handy. I'd also suggest in that case then opening an issue on the WinUI repo directly since it was their update which broke our component.

michael-hawker avatar Jul 07 '22 18:07 michael-hawker

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 avatar Jul 22 '22 19:07 ghost