Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating a new WinUI project in Visual Studio, it doesn't work #10003

Open
branislavjuhas opened this issue Sep 21, 2024 · 5 comments
Open
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners

Comments

@branislavjuhas
Copy link

Describe the bug

When creating a new project, it doesn't build, but just writes, even reinstalling Visual Studio with all of the dependencies doesn't help. In addition, the fun part is that the .NET SDKs listed in the error cannot be downloaded and as of right now the last released version of SDK is 8.0.401, but it requires 402:

Severity Code Description Project File Line Suppression State
Error (active) This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref 10.0.19041.38 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:

10.0.19041.38

wooooork C:\Users\juhas.nuget\packages\microsoft.windowsappsdk\1.6.240829007\buildTransitive\Microsoft.WindowsAppSDK.targets 76

Steps to reproduce the bug

  1. Create a new WinUI C# project in visual studio
  2. Try to build

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@branislavjuhas branislavjuhas added the bug Something isn't working label Sep 21, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Sep 21, 2024
@huoyaoyuan
Copy link

It's really a known issue of unsynchronized release. WASDK 1.6 introduces breaking change in dependency, but released before it gets synchronized into .NET SDK. It's already checked into 8.0.402 but not reaching the release date.

@branislavjuhas
Copy link
Author

@huoyaoyuan, do you have any idea, how to hotfix this? I'd like to create a WinUI new project, but right now, I am quite stack because of this.

@huoyaoyuan
Copy link

huoyaoyuan commented Sep 22, 2024

The workaround is shown the error message that add a temporary <WindowsSdkPackageVersion>. Then everything should build.

@AJsuper007
Copy link

Can you post a video so we can see how to solve the issue?

@Skittles2519
Copy link

Skittles2519 commented Sep 29, 2024

@AJsuper007 I have made a video which showcases the workaround @huoyaoyuan recommended. My Error is different, but it is resolved with the same method. https://youtu.be/B0EcMfr9INw

I added
<WindowsSdkPackageVersion>10.0.22621.38</WindowsSdkPackageVersion> to my PropertyGroup section in the csproj file.

If you are targeting 19041 instead, you would add
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

4 participants