WindowsAppSDK
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
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:
- Install VS community, choose desktop development and make sure to include all the .net and windows app sdk stuff
- Create new project select either of the winui desktop app projects
- Change nothing
- Run the app
- Slap forehead and curse
- Spend hours trying to figure out what exactly is missing so that the default project will &&() compile
- Ask copilot and curse whoever made it look like fisher price
- Ask chatgpt and curse that you have to edit the project file
- Edit the project file with the proposed fix
- Reload project file
- Run the app and marvel at the error message still being there
- Check that you have the right .net SDK installed (spoiler alert: you do)
- 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)
- 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
- install the latest preview of VS community on the vague hope that it will magically solve the problem
- ask your friendly neighborhood windows platform architect and both wallow in wtaf is going on
- log this issue
- marvel that there's no windows 24h2 option when you select the build in the issue
- 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