问题
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