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

Blank WinUI Template App Fails to Build #4781

Open
aaronsuydam opened this issue Oct 5, 2024 · 7 comments
Open

Blank WinUI Template App Fails to Build #4781

aaronsuydam opened this issue Oct 5, 2024 · 7 comments
Labels
area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration

Comments

@aaronsuydam
Copy link

Describe the bug

When creating a new WinUI 3/ WASDK app project in VS2022, attempting to build and run the app fails.

Severity	Code	Description	Project	File	Line	Suppression State	Details
Warning (active)	MSB3277	Found conflicts between different versions of "Microsoft.Windows.SDK.NET" that could not be resolved.
There was a conflict between "Microsoft.Windows.SDK.NET, Version=10.0.19041.38, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Windows.SDK.NET, Version=10.0.22000.24, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
    "Microsoft.Windows.SDK.NET, Version=10.0.19041.38, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "Microsoft.Windows.SDK.NET, Version=10.0.22000.24, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
    References which depend on "Microsoft.Windows.SDK.NET, Version=10.0.19041.38, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Users\suyda\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.38\lib\net6.0\Microsoft.Windows.SDK.NET.dll].
        C:\Users\suyda\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.38\lib\net6.0\Microsoft.Windows.SDK.NET.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.38\lib\net6.0\Microsoft.Windows.SDK.NET.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.38\lib/net6.0/Microsoft.Windows.SDK.NET.dll
    References which depend on or have been unified to "Microsoft.Windows.SDK.NET, Version=10.0.22000.24, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [].
        C:\Users\suyda\.nuget\packages\microsoft.web.webview2\1.0.2651.64\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.web.webview2\1.0.2651.64\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.web.webview2\1.0.2651.64\build\..\\lib_manual\net6.0-windows10.0.17763.0\Microsoft.Web.WebView2.Core.Projection.dll
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.WinUI.dll
            C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll
            C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.InteractiveExperiences.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.InteractiveExperiences.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.InteractiveExperiences.Projection.dll
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.WinUI.dll
            C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll
            C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.WinUI.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.WinUI.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.WinUI.dll
            C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll
            C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppLifecycle.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppLifecycle.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppLifecycle.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Builder.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Builder.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Builder.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Projection.dll
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.AppNotifications.Builder.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Management.Deployment.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.Resources.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.Resources.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.Resources.Projection.dll
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.WinUI.dll
            C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll
            C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Management.Deployment.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Management.Deployment.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Management.Deployment.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.PushNotifications.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.PushNotifications.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.PushNotifications.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Security.AccessControl.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Security.AccessControl.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Security.AccessControl.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Storage.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Storage.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Storage.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.System.Power.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.System.Power.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.System.Power.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.System.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.System.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.System.Projection.dll
        C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Widgets.Projection.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Widgets.Projection.dll".
            C:\Users\suyda\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.Widgets.Projection.dll
        C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll".
            C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll
        C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll
          Project file item includes which caused reference "C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll".
            C:\Users\suyda\.nuget\packages\skiasharp.views.winui\2.88.8\lib\net6.0-windows10.0.19041.0\SkiaSharp.Views.Windows.dll
            C:\Users\suyda\.nuget\packages\scottplot.winui\5.0.39\lib\net8.0-windows10.0.19041\ScottPlot.WinUI.dll	PowerTaskMan	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	2412	

Steps to reproduce the bug

  1. Open VS 2022
  2. Create New Project
  3. Blank WinUI3 App (Packaged)
  4. Hit Green Play Button

Expected behavior

The app builds and runs.

Screenshots

No response

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

@RDMacLachlan RDMacLachlan added area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration and removed needs-triage labels Oct 10, 2024
@codendone
Copy link
Contributor

From the error, maybe your project isn't consistent on whether 19041 or 22000 is the target?

@manodasanW
Copy link
Member

Can you update to the latest .NET SDK released this month and see if you still hit the issue.

@aaronsuydam
Copy link
Author

From the error, maybe your project isn't consistent on whether 19041 or 22000 is the target?

That seems to be the issue.

@aaronsuydam
Copy link
Author

Can you update to the latest .NET SDK released this month and see if you still hit the issue.

How do i do that? Sorry, I'm still trying to figure out the difference between the Windows SDK, the .NET SDK, the Windows App SDK, the Windows Runtime, and everything else. And the fifteen different install methods 😂. Where do I upgrade?

@aaronsuydam
Copy link
Author

If anyone knows... ^^

@ghost1372
Copy link
Contributor

If anyone knows... ^^

Just update your visual studio to latest version.

@manodasanW
Copy link
Member

As mentioned by the previous post, you can either update your Visual Studio version to the latest or update just the .NET SDK from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration
Projects
None yet
Development

No branches or pull requests

5 participants