6

When I try to build a MUAI project, it gives the error “The project doesn't know how to run the profile sample.WinUI". The project gets built but it doesn't run. I am using Visual Studio 2022 Preview(17.0.0 Preview 1.0) and .NET version 6.0.100-preview.5.21302.13

2

1 Answer 1

7

Haven't found this documented yet, but it turns out you need to install the 2022 equivalent of Single-project MSIX Packaging Tools for VS 2019. You can find the 2022 version here:

Single-project MSIX Packaging Tools for VS 2022

Once installed you can build the WinUI project then right-click and select Deploy. Debugging and running should then work as expected.

Sign up to request clarification or add additional context in comments.

3 Comments

I tried your suggestion but it didn't work for me. I'm trying to debug a windows console application and I'm getting the same exact error message as the op
@DarthVegan this answer is specific to preview releases of .Net 6 MAUI projects. Seeing this error in other contexts would suggest you don't have the right project selected as the startup project.
I only have a single project in the solution which of course is the startup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.