Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Starting in .NET 5.0.8 (which includes .NET SDK 5.0.302 and .NET SDK 5.0.205), developers targeting Windows can't use the FrameworkReference
item to override their version of the Windows SDK targeting package. The WindowsSdkPackageVersion
property replaces this functionality.
Note
We don't recommend overriding the Windows SDK version, because the Windows SDK targeting packages are included with the .NET 5+ SDK. Instead, to reference the latest Windows SDK package, update your version of the .NET SDK.
.NET SDK 5.0.302, .NET SDK 5.0.205
Developers could use the FrameworkReference
item to override the Windows SDK package version in .NET 5 applications. For example:
<ItemGroup>
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.18" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.18" />
</ItemGroup>
The WindowsSdkPackageVersion
property replaces the behavior of the FrameworkReference
override. For example:
<PropertyGroup>
<WindowsSdkPackageVersion>10.0.19041.18</WindowsSdkPackageVersion>
</PropertyGroup>
This change might affect source compatibility.
This change was introduced to simplify the package override behavior for targeting the Windows SDK packages produced by C#/WinRT.
Remove any use of FrameworkReference
in your .NET 5+ app's project file when targeting the Windows SDK.
When working with the Windows App SDK, you might need to explicitly add the WindowsSdkPackageVersion
property if the required Windows SDK package version cannot be resolved by .NET SDK. This issue can arise due to different release mechanisms for the Windows App SDK and .NET SDK, where the .NET SDK is shipped through Visual Studio. See details in this GitHub issue. You might also consider removing the WindowsSdkPackageVersion
property once the required Windows SDK package version has been resolved by .NET SDK, ensuring you have the latest Windows SDK package. This typically happens after Visual Studio releases a new version and you've upgraded to that version.
Windows APIs in .NET 5 and later versions that are provided by the Windows SDK targeting package.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Choose the best UI framework for a native Windows development project - Training
Windows developers have various options for creating applications that run on Windows. This module introduces the native Windows UI frameworks that are available for Windows development. It also provides guidance on how to choose the best framework for your application.
Documentation
Project properties - Windows apps
This topic describes the project properties that you can set in your Visual Studio project file to customize how your app is deployed.
NETSDK1135: SupportedOSPlatformVersion can't be higher than TargetPlatformVersion - .NET CLI
How to resolve the `SupportedOSPlatformVersion can't be higher than TargetPlatformVersion' error.
NETSDK1112: The runtime pack was not downloaded - .NET CLI
How to resolve the `runtime pack was not downloaded' error message.