Share via

Getting error while running the project in debug mode. How to solve it?

Sowndarrajan Vijayaragavan 470 Reputation points
2026-04-20T09:43:46+00:00
Windows development | Windows App SDK
0 comments No comments

2 answers

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 18,310 Reputation points Microsoft External Staff Moderator
    2026-04-20T10:28:51.1833333+00:00

    Hi @Sowndarrajan Vijayaragavan ,

    Thanks for reaching out.

    This happens when Visual Studio is trying to start the app with an MSIX packaging profile instead of a normal Windows debug profile. A first step is to open the debug target dropdown next to the Run button and switch to the regular Windows target for the MAUI project rather than one that uses MsixPackage.

    If you are only trying to run the app locally for debugging, I would also recommend changing the Windows packaging setting in the project file from:

    <WindowsPackageType>MSIX</WindowsPackageType>
    

    to:

    <WindowsPackageType>None</WindowsPackageType>
    

    After that, close Visual Studio, delete the .vs, bin, and obj folders, then reopen the solution and rebuild. That will force Visual Studio to recreate its temporary build and launch state, which would clear this kind of profile mismatch.

    If you do need MSIX packaging later, it is better to use that as part of a proper packaging or publishing workflow rather than for normal day-to-day F5 debugging.

    Hope this helps! If my explanation to your issue was helpful, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.

    Was this answer helpful?


  2. AI answer

    2026-04-20T09:43:58.2366667+00:00

    The error indicates that the current startup profile in Visual Studio is set to Windows Machine with the MsixPackage command, but the project is not configured to run that profile.

    To resolve this, change the debug/run profile to one that the project supports:

    1. In Visual Studio, open the solution.
    2. In the toolbar next to the Run/Debug button, open the run configuration dropdown.
    3. Select a valid profile for the MAUI/Windows App SDK project, for example:
      • The project name with Windows (unpackaged), or
      • A different profile that does not use MsixPackage.
    4. Start debugging again (F5).

    If the project is intended to use MSIX packaging, ensure that the packaging project or MSIX profile is correctly created and selected as the startup project instead of the unsupported Windows Machine / MsixPackage profile.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.