How to resolve build error 'This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref 10.0.19041.38 or later.' when upgrading to Windows App SDK 1.6? #5132
-
DescriptionWhen upgrading from Windows App SDK 1.5 to 1.6, the build fails with multiple warnings and errors related to version conflicts and missing SDK references. The error looks like "This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref 10.0.19041.38 or later." How to resolve this error? Related issues |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Root causeThe issue arises because the Windows App SDK and the Windows SDK projection assemblies need to be updated together to maintain compatibility. However, they are released independently, leading to potential runtime incompatibility errors. SolutionAdd the following to your project file to specify the required Windows SDK package version: <PropertyGroup>
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
</PropertyGroup> This change will be unnecessary once the newest .NET SDK is released, which will automatically set the default TFM and Windows SDK package version. |
Beta Was this translation helpful? Give feedback.
Root cause
The issue arises because the Windows App SDK and the Windows SDK projection assemblies need to be updated together to maintain compatibility. However, they are released independently, leading to potential runtime incompatibility errors.
Solution
Add the following to your project file to specify the required Windows SDK package version:
This change will be unnecessary once the newest .NET SDK is released, which will automatically set the default TFM and Windows SDK package version.