WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Clean install on an snapdragon surface laptop 7 with vs community edition and you create a new winui project and change nothing just hit F5 and boom instant error

Open aclinick opened this issue 4 months ago • 2 comments

Describe the bug

Install VS community edition (doesn't seem to matter whether it's GA or preview) and create a new WinUI project. Once it's done just hit F5 and you get:

Severity Code Description Project File Line Suppression State Details Error (active) This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref or later. Please update to .NET SDK 6.0.134, 6.0.426, 8.0.109, 8.0.305 or 8.0.402 (or later). Or add a temporary Microsoft.Windows.SDK.NET.Ref reference which can be added with: <PropertyGroup> <WindowsSdkPackageVersion></WindowsSdkPackageVersion> </PropertyGroup> App1 C:\Users\andre.nuget\packages\microsoft.windowsappsdk\1.6.240923002\buildTransitive\Microsoft.WindowsAppSDK.targets 76

Steps to reproduce the bug

See above but:

  1. Install VS community, choose desktop development and make sure to include all the .net and windows app sdk stuff
  2. Create new project select either of the winui desktop app projects
  3. Change nothing
  4. Run the app
  5. Slap forehead and curse
  6. Spend hours trying to figure out what exactly is missing so that the default project will &&() compile
  7. Ask copilot and curse whoever made it look like fisher price
  8. Ask chatgpt and curse that you have to edit the project file
  9. Edit the project file with the proposed fix
  10. Reload project file
  11. Run the app and marvel at the error message still being there
  12. Check that you have the right .net SDK installed (spoiler alert: you do)
  13. Check if you have the right Windows SDK installed. Marvel at why there isn't a command line tool to do this and then spend time trying to find sdkconfig.exe that copilot recommends that you do. (spoiler alert: you have the right version)
  14. Scratch head why windows sdk is version 10 and you're trying to target Windows 11. Have flashbacks to meetings about how changing the windows version opens a portal to hell and drown you sorrows with a fresh ice cold diet coke
  15. install the latest preview of VS community on the vague hope that it will magically solve the problem
  16. ask your friendly neighborhood windows platform architect and both wallow in wtaf is going on
  17. log this issue
  18. marvel that there's no windows 24h2 option when you select the build in the issue
  19. build a winform, react native or web page because at least you can work out what in the * is going on

Expected behavior

IJFW

Screenshots

No response

NuGet package version

Windows App SDK 1.6.1: 1.6.240923002

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022-preview, Visual Studio 2022

Additional context

No response

aclinick avatar Oct 04 '24 19:10 aclinick