19

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?

piet.t
  • 11,718
  • 21
  • 43
  • 52
user1651749
  • 191
  • 1
  • 1
  • 3
  • 2
    Seems to be a duplicate of http://stackoverflow.com/questions/7451536/how-to-deploy-a-metro-app-to-the-desktop – Daniel Kelley Feb 27 '13 at 11:45
  • 1
    possible duplicate of [Windows 8 application deployment](http://stackoverflow.com/questions/11745179/windows-8-application-deployment) – Ondrej Tucny Feb 27 '13 at 11:52
  • 2
    You cannot create a Windows Store app with monoxna, it will fail the store validation procedure. The usual warning you get when trying to reference assemblies that target the wrong version of .NET doesn't work on assemblies created by Mono. It doesn't write the attribute required for this test to work. – Hans Passant Feb 27 '13 at 14:09
  • Possible duplicate of [Windows 8 application deployment](https://stackoverflow.com/questions/11745179/windows-8-application-deployment) – gotnull Jun 28 '18 at 01:26
  • Does this answer your question? [How to deploy a Metro App to the Desktop?](https://stackoverflow.com/questions/7451536/how-to-deploy-a-metro-app-to-the-desktop) – lukbl May 18 '20 at 21:19

1 Answers1

1

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

Ogglas
  • 62,132
  • 37
  • 328
  • 418