0

The default application created using the template Blank App, Packaged with Windows Packaging Project (WinUI 3 in Desktop) in VS 2022 executes by setting the Package project as the startup project. (With the WinUI project as the startup project "'Unable to load DLL 'Microsoft.ui.xaml.dll'" error was thrown.)

However the application created with Blank App, Packaged (WinUI 3 in Desktop) shows following error on execution:

enter image description here

arung
  • 111
  • 1
  • 1
  • 7
  • Can you make sure you have installed the [required workloads and components](https://stackoverflow.com/a/75480198/2411960)? – Andrew KeepCoding May 02 '23 at 07:04
  • Yes I do have the required workloads, components and SDK installed: Workload: .NET Desktop Development SDK: Windows 10 SDK (10.0.19041.0) Components: Windows App SDK C# Templates, MSIX packaging tools, Single-project MSIX packaging tools for VS 2022. – arung May 03 '23 at 05:54

2 Answers2

0

I couldn't reproduce the issue in VS 2022.

I suggest you could follow the Doc: Install tools for the Windows App SDK, to set up your development computer.

Jeaninez - MSFT
  • 3,210
  • 1
  • 5
  • 20
  • Yes I do have the required workloads, components and SDK installed: Workload: .NET Desktop Development SDK: Windows 10 SDK (10.0.19041.0) Components: Windows App SDK C# Templates, MSIX packaging tools, Single-project MSIX packaging tools for VS 2022. – arung May 03 '23 at 05:50
  • I suggest you could try to `Repair` the visual studio. – Jeaninez - MSFT May 03 '23 at 06:41
0

On the lines of resolution for a similar issue found with .Net MAUI application, installing Single-project MSIX Packaging Tools for VS 2022 solved the problem for me.

In fact this is documented in the official documentation as well.

arung
  • 111
  • 1
  • 1
  • 7