user1651749
user1651749

Reputation: 191

This application can only run in the context of an app container

I am developing an app for Windows 8 on VS2012 using monoxna on C#.

The output .exe file does not run on double click. It displays the message

This application can only run in the context of an app container.

How can I generate a runable exe for that app?

Upvotes: 19

Views: 15713

Answers (1)

Ogglas
Ogglas

Reputation: 70116

If this is a store/UWP app then it can only be installed via an appx package. Typically this should be via the store.

If you don't want to (or can't) distribute through the store then you can create a package that can be installed directly.

In VS go to: PROJECT > Store > Create App Packages... > And select No to building a package for the store

Before you can install the app on a machine you'll need to enable developer features on that machine:
Settings > Update & Security > For developers > select: Sideload apps

Then just run the PowerShell script created with the package to install it.

Source:

https://stackoverflow.com/a/33669395/3850405

Upvotes: 1

Related Questions