最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

.net - Can I choose which MSIX Application gets launched in my launchSettings.json? - Stack Overflow

programmeradmin0浏览0评论

Is it possible to configure which <Application> gets launched when I F5 deploy my projects in Visual Studio?

I have an MSIX WinAppSDK app with a Package.appxmanifest that has multiple <Application>s (this cannot be changed):

<Package
  xmlns=";
  xmlns:mp=";
  xmlns:uap=";
  xmlns:uap3=";
  IgnorableNamespaces="uap rescap wincap">
  <!-- ... -->

  <Applications>
    <Application Id="Global.App1" Executable="App1.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements
        DisplayName="Global.App1"
        Description="Global.App1"
        Square150x150Logo="Assets\Square150x150Logo.png"
        Square44x44Logo="Assets\Square44x44Logo.png"
        BackgroundColor="transparent" AppListEntry="none" />
    </Application>

    <Application Id="Global.App2" Executable="App2.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements
        DisplayName="Global.App2"
        Description="Global.App2"
        Square150x150Logo="Assets\Square150x150Logo.png"
        Square44x44Logo="Assets\Square44x44Logo.png"
        BackgroundColor="transparent" AppListEntry="none" />
    </Application>
  </Applications>
</Package>

And a launchSettings.json that looks like this:

{
  "profiles": {
    "Run App (Local)": {
      "commandName": "MsixPackage",
      "nativeDebugging": true
    }
}

Whenever I F5 deploy from Visual Studio, App1 launches, but I want App2 to launch. Is it possible to change which app launches via the launchSettings.json? (I believe changing the order in the <Applications> list would fix this, but my build system doesn't allow me to reorder them).

发布评论

评论列表(0)

  1. 暂无评论