Error: “This application can only run in the context of an app container.”

独自空忆成欢 提交于 2019-12-13 03:47:20

问题


I created a UWP app with desktop extensions and added the startup task as mentioned here. (I set Executable="AutoStartupTest.exe".)

I logged off and logged on and got the error in the title, and don't know how to fix it because though it makes sense - why is it not in a container? This should happen automatically, no? The link is talking about a UWP app.

EDIT

The extension snippet as requested here.

<Extensions>
  <desktop:Extension Category="windows.startupTask" Executable="AutoStartupTest.exe" EntryPoint="Windows.FullTrustApplication">
    <desktop:StartupTask TaskId="someId" Enabled="true" DisplayName="Hi user!" />
  </desktop:Extension>
</Extensions>

回答1:


StartupTask support for UWP processes is coming in the Fall Creators update later this year.

What you can do today is add a non-UWP EXE to your UWP package and reference that as StartupTask. Be sure to put it in a subfolder inside your package and reference it accordingly, e.g. Executable="Win32\AutoStartTest.exe". Also in this approach you will need to declare the 'runFullTrust' capability.



来源:https://stackoverflow.com/questions/45860740/error-this-application-can-only-run-in-the-context-of-an-app-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!