且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

错误:“此应用程序只能在应用程序容器的上下文中运行."

更新时间:2023-01-06 15:08:14

今年晚些时候的 Fall Creators 更新中将提供对 UWP 进程的 StartupTask 支持.

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

您今天可以做的是将非 UWP EXE 添加到您的 UWP 包中,并将其引用为 StartupTask.确保将它放在包内的子文件夹中并相应地引用它,例如可执行文件=Win32\AutoStartTest.exe".同样在这种方法中,您需要声明runFullTrust"功能.

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.