WindowsAppSDK
WindowsAppSDK copied to clipboard
Syntax error in Microsoft.WindowsAppSDK.targets
Describe the bug
As of writing, 1.6.240923002 is the latest release. It is currently impossible to build new projects without editing the Microsoft.WindowsAppSDK.targets file directly, as it contains a syntax error. There is an inavlid extra "<" at Line 76.
It is possible that this is the same issue that #4784 roughly describes. Not sure about that though.
Steps to reproduce the bug
- Update any existing Windows App SDK project to 1.6.240923002; Alternatively, create a new project with that package version.
- Microsoft.WindowsAppSDK.targets fails to load.
Working workaround
- Go into the Microsoft.WindowsAppSDK.targets file
- Go to line 71
- Remove the extra '<' symbol. It should be marked as a syntax error.
Expected behavior
The syntax error should not exist.
Screenshots
NuGet package version
Windows App SDK 1.6.1: 1.6.240923002
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
Can you delete the restored winappsdk package in the nuget folder and see if you still see the extra < or not when it restores again. At least looking at the package on nuget.org (https://nuget.info/packages/Microsoft.WindowsAppSDK/1.6.240923002) and specifically at the target, I am not seeing the extra <.
I do not know what causes it to appear. I have tested this on another, new development machine. It also appeared on that device. It is only there for the newest version of the package.
Have you tried the recommended steps outlined by @manodasanW ?
Can you delete the restored winappsdk package in the nuget folder and see if you still see the extra
<or not when it restores again. At least looking at the package on nuget.org (https://nuget.info/packages/Microsoft.WindowsAppSDK/1.6.240923002) and specifically at the target, I am not seeing the extra<.
Yes, I have tried this. It did not make a difference. The extra symbol is always there. I recently installed the package on my laptop with no previous tooling. It was also there. It only exists when trying the mentioned version.
Did you clear your nuget cache, such as C:\Users\myacct.nuget\packages\microsoft.windowsappsdk?
If this is a C++ project, please also clear your solutions packages cache.
Clearing the NuGet cache seems to have fixed it for me.