Can't add Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 to project

KM 20 Reputation points
2023-01-24T15:36:59.2166667+00:00

I am running VS Community 2022 (64-bit) - Version 17.4.4 on Windows 11 Pro 22H2. Trying to add Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 to a WinUI 3 project. I get this output when adding through VS or using the dotnet command at a console prompt:

NU1202: Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 is not compatible with net6.0-windows10.0.17763 (.NETCoreApp,Version=v6.0). Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 supports: uap10.0.17763 (UAP,Version=v10.0.17763)

NU1202: Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 is not compatible with net6.0-windows10.0.17763 (.NETCoreApp,Version=v6.0) / win10-arm64. Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 supports: uap10.0.17763 (UAP,Version=v10.0.17763)

NU1202: Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 is not compatible with net6.0-windows10.0.17763 (.NETCoreApp,Version=v6.0) / win10-x64. Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 supports: uap10.0.17763 (UAP,Version=v10.0.17763)

NU1202: Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 is not compatible with net6.0-windows10.0.17763 (.NETCoreApp,Version=v6.0) / win10-x86. Package Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.3 supports: uap10.0.17763 (UAP,Version=v10.0.17763)

My project originally had 10.0.19041.0 as the targeted version, but I changed both targeted and min version to 10.0.17763.0. I've also manually installed .NET SDK 6.0.405 (x64) but that didn't make a difference.

Any thoughts?

Thanks.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,251 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 86,151 Reputation points
    2023-01-24T18:22:49.7766667+00:00

    For WinUI 3, the NuGet Package is

    CommunityToolkit.WinUI.UI.Controls

    or

    CommunityToolkit.WinUI.UI.Controls.DataGrid

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.