Click here to Skip to main content
15,347,733 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

After nearly a decade of not coding, I thought I'd brush up on my WPF/C# "skills".

So, VS2022 in hand and Windows App SDK installed with templates. I duly created a WinUI app from the "Blank App, Packaged (WinUI 3 in Desktop) template.

It runs, yay.

Next, I wanted to add the Datagrid control from the Windows Community Toolkit. So I fire up Nuget and get this error when I try to add the control.

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

I also tried this in the console:
Install-Package Microsoft.Toolkit.Uwp -Version 7.1.2

Same problem :(

Project properties for Target OS is: 10.0.22000.0 Supported OS version is 10.0.17763.0

I can't for the life of me understand what's wrong, please help?

What I have tried:

Please see the description for information on what I tried. Perhaps I need to make this string longer so I can post a question. I wonder how long I should make it? I'd better make it longer than my patience, as the length of that == String.empty.
Posted
Updated 17-Apr-22 0:10am

I've never used it, but the error message seems pretty clear: The UWP toolkit is based on a framework that is not compatible with the .NET Core V6 framework.

If you want ot use that toolset, you will have to look at what framework(s) and version (s) it does support, and change the framework the rest of your app is built for.
   
Thank you for taking the time to post OriginalGriff.

Sorry, but what framework should I be installing?

I thought that the Windows App SDK was meant to unify all GUIs & frameworks in Windows? You know, moving forward use the latest App SDK (1.0) along with the latest framework (6)?

Forgive me if my original post was a bit salty, I do want to learn. I'm just struggling with a set of rules that I can't even find a clear set of definitions for.

Best regards,

Mr Crane
   
Comments
Michael Hulthin 15-Apr-22 8:59am
   
Google reports you need version 8, see https://devblogs.microsoft.com/ifdef-windows/announcing-net-community-toolkit-v8-0-0-preview-1/
MrCrane 17-Apr-22 7:02am
   
Hello Michael,

Thank you for taking the time to reply, I shall give that a go.

Best regards,

Mr Crane
Hello Michael,

Thank you for taking the time to reply, I shall give that a go.

Best regards,

Mr Crane
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900