I have just updated my .NET 8 MAUI application and in particular the Community Toolkit MVVM. The application works for iOS and Android. When I try to start the Windows version, I get this error
MVVMTKCFG0003 This version of the MVVM Toolkit requires 'Microsoft.Windows.SDK.NET.Ref' version '10.0.19041.38' or later. Please update to .NET SDK 8.0.109, 8.0.305 or 8.0.402 (or later). Alternatively, use a temporary 'Microsoft.Windows.SDK.NET.Ref' reference, which can be done by setting the 'WindowsSdkPackageVersion' property in your .csproj file. For your project configuration, it is recommended to set the package version to '10.0.19041.41'. LanguageInUse (net8.0-windows10.0.19041.0) C:\Users\enric.nuget\packages\communitytoolkit.mvvm\8.3.1\buildTransitive\CommunityToolkit.Mvvm.WindowsSdk.targets
So, I edited the project and changed this line
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">
$(TargetFrameworks);net8.0-windows10.0.19041.0
</TargetFrameworks>
in
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">
$(TargetFrameworks);net8.0-windows10.0.19041.41
</TargetFrameworks>
Also, I updated the .NET SDK, downloading the latest version. After that, I get another error because this version is not recognized. How can I fix it?
Community Toolkit MVVM.