Skip to content

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

Open
@djonasdev

Description

@djonasdev

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)
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DataGrid 🔠Issues on DataGrid controlWinUI 💠Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.bug 🐛An unexpected issue that highlights incorrect behaviorexternal ⤴️Requires an update to an external dependency or due to code outside the Toolkit.sdkcheck 🏁

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions