How to deploy MAUI app with ClickOnce method.

Igor Markiv 0 Reputation points
2023-11-30T12:22:05.8866667+00:00

I'm trying to build and publish very simple hello world Maui application and deploy it with click Once method :
https://learn.microsoft.com/en-us/visualstudio/deployment/clickonce-deployment-dotnet?view=vs-2022

I'm suing this command to build and deploy :

msbuild mauDeployTest.csproj /t:Publish /p:PublishMethod=ClickOnce /p:ApplicationVersion=1.0.0.0 /p:Install=true  /p:Configuration=Release

dotnet mage -al mauDeployTest.exe -td "C:\Users\Admin\Desktop\mauiPublishTest\mauiDeployTest\mauDeployTest\bin\Release\net7.0-windows10.0.22621.0\win10-x64"

dotnet mage -new Application -t "C:\Users\Admin\Desktop\mauiPublishTest\mauiDeployTest\mauDeployTest\bin\Release\net7.0-windows10.0.22621.0\win10-x64\mauDeployTest.manifest" -fd "C:\Users\Admin\Desktop\mauiPublishTest\mauiDeployTest\mauDeployTest\bin\Release\net7.0-windows10.0.22621.0\win10-x64" -v 1.0.0.1

dotnet mage  -new Deployment -n mauDeployTest -Install true -pub S4H -v 1.0.0.1 -AppManifest "C:\Users\Admin\Desktop\mauiPublishTest\mauiDeployTest\mauDeployTest\bin\Release\net7.0-windows10.0.22621.0\win10-x64\mauDeployTest.manifest" -t "C:\Users\Admin\Desktop\wzz_mauDeployTest.application" -ip true -pu "C:\Users\Admin\Desktop\wzz_mauDeployTest.application"

I manage to successfully create an installer and install the app. But when I'm trying to run app nothing is happening.

The reason why I'm facing such behaviour is can be related with this topic :
https://learn.microsoft.com/en-us/answers/questions/1314646/how-to-run-maui-exe-from-windowsapps-folder

But I this case, I do not understand how I suppose to publishing and deploying apps with clickOnce method.

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

  2. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2023-12-01T08:17:26.8633333+00:00

    Hello,

    Usually, ClickOnce is used to work for an unpackaged file, it looks that that you're trying to deploy a packaged MSIX file, it is recommend using the App Installer.

    It works with Windows Apps, and the MAUI publishing wizard has the option to create an app installer file. Please refer to Publish a .NET MAUI app for Windows with Visual Studio for more details.

    Best Regards,

    Alec Liu.


    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.


Your answer

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