Skip to content

How to resolve CS0433 error when building WindowsAppSDK 1.5.X solutions after Visual Studio update? #5131

Discussion options

You must be logged in to vote

Root cause

The error occurs due to a recent Windows SDK projection update that added some Windows namespace types, including TextDecorations, which overlap with types in the Microsoft namespace. This causes a conflict when building projects using WindowsAppSDK 1.5.X.

Solution

To resolve this issue, you can either update to WinAppSDK 1.6 or above, which addresses this conflict, or specify an older Windows SDK projection version in your project file.
To specify an older version, you will need to add the WindowsSdkPackageVersion property to your csproj to lock the Windows SDK projection version to 34. Let's say your project is targeting at Windows 10.0.19041.0, then set the property as the f…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LegendaryBlair
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant