如何在Windows应用程序打包项目的MSIX文件中包括生成的App Manifest

问题描述

我正在编写一个VB.NET Windows窗体应用程序,该应用程序需要使用程序包身份进行部署,因此我正在为其生成MSIX文件。我希望该应用程序启用高DPI,因此我在app.manifest中设置了所需的密钥。在构建应用程序并在没有MSIX封装的情况下运行它时,高DPI支持工作正常。通过Windows应用程序打包项目构建和运行MSIX打包时,高DPI支持不起作用。 (我以前曾尝试在app.config中指定对DPI的高支持,但是显然这会禁用VB.NET应用程序的视觉样式,而我宁愿不禁用应用程序框架来尝试解决此问题。)

似乎生成的应用清单文件未包含在MSIX文件中。如何包含此文件

没有MSIX打包的调试版本目录的内容

10/14/2020  05:27 PM    <DIR>          .
10/14/2020  05:27 PM    <DIR>          ..
10/14/2020  05:27 PM    <DIR>          app.publish
03/19/2019  12:46 AM           160,160 System.Runtime.WindowsRuntime.dll
03/19/2019  12:46 AM            72,096 System.Runtime.WindowsRuntime.UI.Xaml.dll
10/22/2018  08:48 PM            24,064 Windows.Foundation.FoundationContract.winmd
10/22/2018  08:48 PM         5,612,032 Windows.Foundation.UniversalApiContract.winmd
08/09/2018  05:44 PM           174,080 windows.winmd
10/14/2020  05:27 PM             1,899 MyApp.application
10/14/2020  05:21 PM            24,064 MyApp.exe
10/13/2020  03:31 PM               369 MyApp.exe.config
10/14/2020  05:27 PM             6,371 MyApp.exe.manifest
10/14/2020  05:21 PM            54,784 MyApp.pdb
10/14/2020  05:21 PM               727 MyApp.xml
              11 File(s)      6,130,646 bytes
               3 Dir(s)   7,844,708,352 bytes free

带有MSIX封装的调试版本目录的内容

10/14/2020  05:16 PM    <DIR>          .
10/14/2020  05:16 PM    <DIR>          ..
03/19/2019  12:46 AM           160,096 System.Runtime.WindowsRuntime.UI.Xaml.dll
10/14/2020  05:16 PM            24,064 MyApp.exe
10/13/2020  03:31 PM               369 MyApp.exe.config
10/14/2020  05:16 PM            54,784 MyApp.pdb
               5 File(s)        311,473 bytes
               2 Dir(s)   7,842,045,952 bytes free

MyApp.exe.manifest似乎没有包含在MSIX软件包中,我想包含它。在Windows应用程序打包项目中我该怎么做?

Visual Studio 2019社区16.7.6,.NET Framework 4.8,Windows 10版本1909。

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)