[英]Packaging Desktop App and UWP App together, should I remove the package.appxmanifest file from the UWP project?
[英]Remote app service declaration gets removed from package.appxmanifest when trying to create appx
我根据Microsoft文档创建了appxmanifest,因此看起来像这样:
<Application ...>
...
<Extensions>
<uap:Extension Category="windows.appService">
<uap3:AppService Name="com.myapp.service" SupportsRemoteSystems="true"/>
</uap:Extension>
</Extensions>
</Application>
我在Package
标签中添加了uap3
定义。
当我使用Visual Studio将应用程序部署到PC和手机上时,它运行良好。 但是,当我尝试在Release或Debug配置中创建appx包(在两种模式下,在侧面加载和用于存储)时,都会从我的package.appxmanifest
删除Extension
。
我正在使用SDK版本14393运行Visual Studio 2015 Update3。(最低版本也设置为14393)
为什么Visual Studio不断从清单文件中删除我的远程应用程序服务定义? 我该如何解决?
我现在可以重现您的问题。 我想这里的问题是因为您已经在“ 创建应用程序包”向导中选中了“自动递增”或手动更改了版本 。
在Package.appxmanifest的Package / Identity元素的Version属性中,将软件包版本号设置为值,例如:
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
IgnorableNamespaces="uap mp uap3">
<Identity
Name="Microsoft.SDKSamples.AppServicesProvider.CS"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
Version="1.0.0.0" />
...
</Package>
如果我们在“ 创建应用程序包”向导中选中了“自动递增”或手动更改了版本 。
Visual Studio将自动更新Package.appxmanifest 。 在这种情况下, uap3:AppService
元素也将被删除。 我将在内部报告此问题,如果有任何进展,请在此处进行更新。
目前,作为一种解决方法,请不要在“ 创建应用程序包”向导中选中“自动递增”或手动更改版本 。 如果需要更改软件包版本,可以在Package.appxmanifest中手动进行。
如果不需要SupportsRemoteSystems,则可以将uap3:AppService
更改为uap:AppService
,然后VS不会将其删除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.