WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Syntax error in Microsoft.WindowsAppSDK.targets

Open Davide244 opened this issue 1 year ago • 4 comments

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

  1. Update any existing Windows App SDK project to 1.6.240923002; Alternatively, create a new project with that package version.
  2. Microsoft.WindowsAppSDK.targets fails to load.

Working workaround

  1. Go into the Microsoft.WindowsAppSDK.targets file
  2. Go to line 71
  3. Remove the extra '<' symbol. It should be marked as a syntax error.

Expected behavior

The syntax error should not exist.

Screenshots

Image

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

Davide244 avatar Oct 09 '24 16:10 Davide244

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 <.

Image

manodasanW avatar Oct 09 '24 20:10 manodasanW

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.

Davide244 avatar Oct 10 '24 11:10 Davide244

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 <.

RDMacLachlan avatar Oct 14 '24 17:10 RDMacLachlan

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.

Davide244 avatar Oct 18 '24 06:10 Davide244

Did you clear your nuget cache, such as C:\Users\myacct.nuget\packages\microsoft.windowsappsdk?

RDMacLachlan avatar Oct 21 '24 17:10 RDMacLachlan

If this is a C++ project, please also clear your solutions packages cache.

RDMacLachlan avatar Oct 21 '24 17:10 RDMacLachlan

Clearing the NuGet cache seems to have fixed it for me.

Davide244 avatar Oct 21 '24 18:10 Davide244