Skip to content

Default WinUI3 c# solution does not run #10401

@ScottAlexanderOpto

Description

@ScottAlexanderOpto

Describe the bug

Just updated VS2022 to version 17.12.5
Created a brand new WinUI3 C# application.
Tried to run it (previous version worked ... had a button to be clicked in the UI).
This version has all compile errors. No reference to Microsoft.UI.Xaml. Installed it using NuGet.
Now get error:
Cannot create instance of type 'Microsoft.UI.Xaml.Controls.XamlControlsResources' [Line: 10 Position: 40]

Steps to reproduce the bug

  1. File::New::Project
  2. In Create a new project window, select "Blank App, Packaged (WinUI 3 in Desktop) ... and give it a name
  3. Build::Rebuild Solution
  4. Debug::Start Debugging

Expected behavior

Should load the app with a button in the center of the screen. Clicking the button changes the content to "Clicked".

Screenshots

No response

NuGet package version

None

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions