Home > OS >  Easiest way to launch a MAUI app exe on Windows?
Easiest way to launch a MAUI app exe on Windows?

Time:09-16

Is there a way to run the exe on a Windows desktop without doing the installer and deployment steps? I noticed everything needed ends up in the AppX folder under bin\debug\win10-x64 but because of the App Store integration it seems like it can only be launched via the start menu shortcut. Is there a way to manually create the shortcut? I'm in a dev/qa environment where we share & pass utilities around and it's kind of a pain to run an installer every time.

I'm down for making a simple reg script, if that's what it takes. It looks like a reference is added in HKLM\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Deployment\Package\*

And the details appear to be setup here: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\Application\Data\

CodePudding user response:

You can create an executable application from an exe using the following method, but since it is only a backdoor method, it may cause some problems.

Operation1

Add a WindowsPackageType tag that holds None in the PropertyGroup tag in the csproj file.

<PropertyGroup>
    ~omission~
    <WindowsPackageType>None</WindowsPackageType>
</PropertyGroup>

Operation2

Modify the launchSettings.json file in the Properties folder in the project as follows

{
  "profiles": {
    "Windows Machine": {
      "commandName": "Project", ←Rewrite from MsixPackage to Project
      "nativeDebugging": false
    }
  }
}

References

  • Related