"The project doesn't know how to run the profile MauiApp.WinUI"
Asked Answered
M

6

12

I am trying to get started with a brand new .NET Maui application. Upon creating the project, it has a single project for the MauiApp, and another project named MauiApp.WinUI. When I try to run the the app on my Windows 10 device, I get the error: "The project doesn't know hot to run the profile MauiApp.WinUI". I am not sure what to do in order to fix this. Any suggestions?

Mose answered 19/6, 2021 at 19:51 Comment(2)
which exact version of vs you are using?Kordula
I used Visual Studio Community 2019 Preview (16.11.0 Preview 2.0) to get the Maui templates to appear. That is the version I used when this issue occurred as well.Mose
R
11

In my case installing Single-project MSIX Packaging Tools solved the problem.

Just in case, I already had Project Reunion (Preview) installed.

Refurbish answered 25/6, 2021 at 12:9 Comment(5)
it works for me too, but why we need these extensions?Rive
Welcome to Stack Overflow. I moved the links inline to aid in readability. Please review the markup so you can add links to your answers in the future.Byrn
Also, I used the same URLs you had defined, but the first URL doesn't actually point to a tutorial, but simply references the Single-project MSIX Packaging Tools referenced by the second link. Can you correct that URL?Byrn
I have updated the link of "Single-project MSIX Packaging Tools for VS 2022 preview" package.Capone
@ChinmayT - the question is tagged visual-studio-2019 though. Better to add the link rather than replace it -- but it's already there anyway in this answer of Shidouuu.Accelerando
A
15

As of 7/14/21, you should use the Single-project MSIX Packaging Tools for VS 2022, not the one for VS 2019.

Ascogonium answered 30/10, 2021 at 21:20 Comment(1)
Why is this still in preview as of Aug 2022? VS 2022 has been out for over 6 months...Brodench
R
11

In my case installing Single-project MSIX Packaging Tools solved the problem.

Just in case, I already had Project Reunion (Preview) installed.

Refurbish answered 25/6, 2021 at 12:9 Comment(5)
it works for me too, but why we need these extensions?Rive
Welcome to Stack Overflow. I moved the links inline to aid in readability. Please review the markup so you can add links to your answers in the future.Byrn
Also, I used the same URLs you had defined, but the first URL doesn't actually point to a tutorial, but simply references the Single-project MSIX Packaging Tools referenced by the second link. Can you correct that URL?Byrn
I have updated the link of "Single-project MSIX Packaging Tools for VS 2022 preview" package.Capone
@ChinmayT - the question is tagged visual-studio-2019 though. Better to add the link rather than replace it -- but it's already there anyway in this answer of Shidouuu.Accelerando
D
5

I was under the impression after watching a few of the community hangouts that all you needed to do was run the maui-check tool.

It appears that there are other dependencies beyond the tools capabilites, or that it doesn't check, which is a little annoying. But are listeed in the installation docs.

Single-project MSIX Packaging Tools

Project Reunion (Preview)

After installing these everything worked fine.

Distorted answered 27/6, 2021 at 11:47 Comment(0)
C
4

From VS 2022 preview : I just deleted the file launchSettings.json and the app launched !

Capsular answered 8/12, 2022 at 15:44 Comment(0)
M
1

I installed Single-project MSIX Packaging Tools extension and Project Reunion extension (preview for VS2022). But this was not enough, I still could not start the app.

Then I installed MSIX Packaging tool from MS Store, and it finally worked.

Here's my launchSettings.json file:,

"profiles": {
    "TestWinUI": {
      "commandName": "MsixPackage"
    }
  }
Macerate answered 24/7, 2021 at 20:17 Comment(0)
D
1

this also worked, edit launchsettings.json:

"profiles": {
    "UnoApp1.Windows (Unpackaged)": {
        "commandName": "Project"
    },
    "UnoApp1.Windows (Package)": {
        "commandName": "MsixPackage"
    }
}

}

Disunity answered 5/4 at 1:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.