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

Closed
branislavjuhas opened this issue Sep 21, 2024 · 8 comments
Closed
Labels
bug Something isn't working needs-author-feedback Asked author to supply more information. no-recent-activity

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>

@marcelwgn
Copy link
Collaborator

@branislavjuhas Creating a new project now, seems to work fine for me. Are you still able to reproduce this?

@marcelwgn marcelwgn added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Nov 28, 2024
@huoyaoyuan
Copy link

It should be already fixed by October or November release of Visual Studio.

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

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-author-feedback Asked author to supply more information. no-recent-activity
Projects
None yet
Development

No branches or pull requests

5 participants