Hello,
MAUI app that targets on Windows platform uses WinUI3, and it currently only allows publishing an MSIX package. You could refer to Publish a .NET MAUI app to a folder for Windows - .NET MAUI | Microsoft Learn
The main question is how to open/launch a WinUI3 published app (MSIX
) from WinForms app.
You could try to launch the app with an execution alias.
Please open the source code of /Platforms/Windows/Package.appxmanifest in your MAUI app, then reference the namespace(xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
) in the top of Package.appxmanifest
, add add the following code in the Application
element.
<Extensions>
<uap5:Extension Category="windows.appExecutionAlias">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="MyApp.exe"/>
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
After that, you can call Process.Start("MyApp.exe") in your WinForms app.
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.