使用FullTrustProcessLauncher的应用程序[UWP]“应用程序包”创建失败 [英] [UWP]'App Package' creation fails for app using FullTrustProcessLauncher

查看:310
本文介绍了使用FullTrustProcessLauncher的应用程序[UWP]“应用程序包”创建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在创建一个UWP应用程序,它需要调用exe来获得一些额外的功能。我在项目中包含了exe,并通过添加以下内容对清单文件进行了更改 -

 xmlns:rescap =" http:// schemas .microsoft.com / APPX /清单/基础/ windows10 / restrictedcapabilities" 
xmlns:desktop =" http://schemas.microsoft.com/appx/manifest/desktop/windows10"


< Extensions> 
< deskwindows.fullTrustProcess"可执行= QUOT; ConsoleApp1.exe" />
< / Extensions>


<功能> 
< Capability Name =" internetClient" />
< rescap:Capability Name =" runFullTrust" />
< / Capabilities>

" rescap:Capability"突出显示为名称空间功能不包含"功能"的错误。


我已将exe包含在我的解决方案中并设置为"始终复制"到输出目录。调试构建和发布构建运行,我可以从应用程序启动exe。





但是当我尝试创建"App Package"以将其上传到商店时,包创建失败并出现以下错误 -

 0x80080204  - 指定的包格式为无效:包清单无效。


清单验证错误:第29行,第64列,原因:文件名" ConsoleApp1.exe"声明元素" * [local-name()='Applications'] / * [local-name()='Application'] / * [local-name()='Extensions'] / * [local-name( )='Extension'和@ Category ='windows.fullTrustProcess']"包中不存在。


清单验证错误:第29行,第64列,原因:文件名"ConsoleApp1。 exe文件"声明元素" * [local-name()='Applications'] / * [local-name()='Application'] / * [local-name()='Extensions'] / * [local-name( )='扩展'而不是(@ Category ='windows.backgroundTasks'或@ Category ='windows.appService')]"包中不存在。


包创建失败。


有人可以帮我这个吗?我做错了什么?



另外,假设这个清单问题已修复,我准备将应用程序上传到商店,我需要填写这个

Bridge app form
或者我可以像其他普通应用一样直接上传吗?










解决方案

嗨  anubhavhcm,


欢迎来到
开发通用Windows应用论坛
!请使用  标记 
发布到此论坛时,谢谢!


>>有人可以帮我这个?我做错了什么?


您的意思是您的应用程序在调试和发布模式下都能正常运行,而您只有在遇到问题时才会遇到问题打包应用程序?查看

使用Visual Studio打包应用程序(修改包清单)
,注意添加  IgnorableNamespaces = " uap
mp rescap"
到清单。此外,您还可以使用文档检查您的应用清单  https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-extensions#win32-process  和
再次测试。


>>我是否需要填写此Bridge应用程序表单,或者我可以直接将其上传为任何其他常规应用程序?


作为  分发打包的桌面应用(桌面桥),如果您计划发布到Windows应用商店,则应填写
表单
,Microsoft将与您联系以启动入职流程。


祝你好运,


微风


Hi,

I am creating a UWP app which needs to call an exe for some extra functionality. I included the exe in the project and made changes to the manifest file by adding the following -

xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" 
  xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" 

      <Extensions>
        <deskwindows.fullTrustProcess" Executable="ConsoleApp1.exe" />
      </Extensions>

  <Capabilities>
    <Capability Name="internetClient" />
    <rescap:Capability Name="runFullTrust" />
  </Capabilities>

"rescap:Capability" is highlighted as an errors saying namespace Capabilities does not contain 'Capability'.

I have included the exe into my solution and have set to 'always copy' to the output directory. The debug build and release build run and I am able to launch the exe from the app.


But when I tried creating 'App Package' for uploading it to store, the package creation fails with the following errors -

0x80080204 - The specified package format is not valid: The package manifest is not valid.

Manifest validation error: Line 29, Column 64, Reason: The file name "ConsoleApp1.exe" declared for element "*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='Extensions']/*[local-name()='Extension' and @Category='windows.fullTrustProcess']" doesn't exist in the package.

Manifest validation error: Line 29, Column 64, Reason: The file name "ConsoleApp1.exe" declared for element "*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='Extensions']/*[local-name()='Extension' and not(@Category='windows.backgroundTasks' or @Category='windows.appService')]" doesn't exist in the package.

Package creation failed.

Can someone please help me with this? What is it that I am doing wrong?

Also, let's say this manifest issue is fixed and I am ready to upload the app to the store, do I need to fill this Bridge app form or I can directly upload it as any other normal app?




解决方案

Hi anubhavhcm,

Welcome to the Developing Universal Windows apps forum! Please utilize tagging when posting to this forum, thanks!

>>Can someone please help me with this? What is it that I am doing wrong?

Do you mean your app can work well in both debug and release mode and you only have the issue when you package the app? See the Package an app by using Visual Studio(Modify the package manifest), note that adding IgnorableNamespaces="uap mp rescap" to the manifest. Besides, you can also check your app manifest with the document https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-extensions#win32-process and test it again.

>>do I need to fill this Bridge app form or I can directly upload it as any other normal app?

As the Distribute a packaged desktop app (Desktop Bridge), if you plan to publish to the Windows Store, you should fill out the form, and Microsoft will contact you to start the onboarding process.

Best regards,

Breeze


这篇关于使用FullTrustProcessLauncher的应用程序[UWP]“应用程序包”创建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆