12

I am a little desperate. I have been trying to resolve the following issue for hours.

I have developed an app which I now tried to install by using Visual Studio 2015's Setup Wizard Extension. Everything is building or (no errors) but when I open the app it highlights that it can only open in the context of an app container. What does that mean? Any advice would be highly appreciated!

The app is working with an SQlite database. Could this have something to do with the dependencies? If so, how could I approach fixing this?

UPDATE:

# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
    PromptYesString = &Yes
    PromptNoString = &No
    BundleFound = Found bundle: {0}
    PackageFound = Found package: {0}
    CertificateFound = Found certificate: {0}
    DependenciesFound = Found dependency package(s):
    GettingDeveloperLicense = Acquiring developer license...
    InstallingCertificate = Installing certificate...
    InstallingPackage = \nInstalling app...
    AcquireLicenseSuccessful = A developer license was successfully acquired.
    InstallCertificateSuccessful = The certificate was successfully installed.
    Success = \nSuccess: Your app was successfully installed.
    WarningInstallCert = \nYou are about to install a digital certificate to your computer's Trusted People certificate store. Doing so carries serious security risk and should only be done if you trust the originator of this digital certificate.\n\nWhen you are done using this app, you should manually remove the associated digital certificate. Instructions for doing so can be found here: http://go.microsoft.com/fwlink/?LinkId=243053\n\nAre you sure you wish to continue?\n\n
    ElevateActions = \nBefore installing this app, you need to do the following:
    ElevateActionDevLicense = \t- Acquire a developer license
    ElevateActionCertificate = \t- Install the signing certificate
    ElevateActionsContinue = Administrator credentials are required to continue.  Please accept the UAC prompt and provide your administrator password if asked.
    ErrorForceElevate = You must provide administrator credentials to proceed.  Please run this script without the -Force parameter or from an elevated PowerShell window.
    ErrorForceDeveloperLicense = Acquiring a developer license requires user interaction.  Please rerun the script without the -Force parameter.
    ErrorLaunchAdminFailed = Error: Could not start a new process as administrator.
    ErrorNoScriptPath = Error: You must launch this script from a file.
    ErrorNoPackageFound = Error: No package or bundle found in the script directory.  Please make sure the package or bundle you want to install is placed in the same directory as this script.
    ErrorManyPackagesFound = Error: More than one package or bundle found in the script directory.  Please make sure only the package or bundle you want to install is placed in the same directory as this script.
    ErrorPackageUnsigned = Error: The package or bundle is not digitally signed or its signature is corrupted.
    ErrorNoCertificateFound = Error: No certificate found in the script directory.  Please make sure the certificate used to sign the package or bundle you are installing is placed in the same directory as this script.
    ErrorManyCertificatesFound = Error: More than one certificate found in the script directory.  Please make sure only the certificate used to sign the package or bundle you are installing is placed in the same directory as this script.
    ErrorBadCertificate = Error: The file "{0}" is not a valid digital certificate.  CertUtil returned with error code {1}.
    ErrorExpiredCertificate = Error: The developer certificate "{0}" has expired. One possible cause is the system clock isn't set to the correct date and time. If the system settings are correct, contact the app owner to re-create a package or bundle with a valid certificate.
    ErrorCertificateMismatch = Error: The certificate does not match the one used to sign the package or bundle.
    ErrorCertIsCA = Error: The certificate can't be a certificate authority.
    ErrorBannedKeyUsage = Error: The certificate can't have the following key usage: {0}.  Key usage must be unspecified or equal to "DigitalSignature".
    ErrorBannedEKU = Error: The certificate can't have the following extended key usage: {0}.  Only the Code Signing and Lifetime Signing EKUs are allowed.
    ErrorNoBasicConstraints = Error: The certificate is missing the basic constraints extension.
    ErrorNoCodeSigningEku = Error: The certificate is missing the extended key usage for Code Signing.
    ErrorInstallCertificateCancelled = Error: Installation of the certificate was cancelled.
    ErrorCertUtilInstallFailed = Error: Could not install the certificate.  CertUtil returned with error code {0}.
    ErrorGetDeveloperLicenseFailed = Error: Could not acquire a developer license. For more information, see http://go.microsoft.com/fwlink/?LinkID=252740.
    ErrorInstallCertificateFailed = Error: Could not install the certificate. Status: {0}. For more information, see http://go.microsoft.com/fwlink/?LinkID=252740.
    ErrorAddPackageFailed = Error: Could not install the app.
    ErrorAddPackageFailedWithCert = Error: Could not install the app.  To ensure security, please consider uninstalling the signing certificate until you can install the app.  Instructions for doing so can be found here:\nhttp://go.microsoft.com/fwlink/?LinkId=243053

ANOTHER UPDATE: Ran the sideloading install script as an adiminstrator in PowerShell and now received the following error:

Package could not be registered. (Exception from HRESULT: 0x80073CF6) Googled it but not many results for Windows 10 developers.

Mike Nedelko
  • 709
  • 1
  • 8
  • 28
  • what type of app is this .. can you be more specific.. – MethodMan Nov 11 '15 at 19:56
  • Thank you method Man. It is a quiz app. It merely allows volunteers to use 4 questions (with illustrations) to approach people on the street to quizz them on human trafficking. It is an outreach tool. Every time a user gets a question right they get a point. Once a volunteer returns they are required to export the results to a csv file. – Mike Nedelko Nov 11 '15 at 19:58
  • 1
    http://stackoverflow.com/questions/7451536/how-to-deploy-a-metro-app-to-the-desktop – Tim Freese Nov 11 '15 at 20:00
  • Thank you Tim. I saw that, but the post doesn't quite help as i require to distribute this app with an easy to use installer. – Mike Nedelko Nov 11 '15 at 20:09
  • 1
    As MethodMan presumably was asking, what platform is this app for? The "app container" part sounds like it's a Metro (Modern/Immersive) app, in which case you're expected to deploy it using the Windows Store. – Sören Kuklau Nov 11 '15 at 21:03

3 Answers3

31

If this is a store/UWP app then it can only be installed via an appx package. Typically this should be via the store.
It is not possible to install a modern/store/UWP app with an MSI.

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.

Your comment about store submission taking 7 days does not sound correct. Typically submissions will go through in under an hour and only in exceptional circumstances take more than a day.

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • Thank you Matt. This was great advice. Thank you very much. I also figured out why my app package didn't install. I had a special character in the Package Name: '|'. Visual Studio had not highlighted this as an issue in the manifest file but it prevented me from sideloaded the app which is actually family straight forward based on your instructions on Windows 10 (I know this seems to be a pain in Windows 8).THANK YOU ALL for your great advice. After several anxious hours, I saw the 'application installed successfully' prompt which made me very very happy :D – Mike Nedelko Nov 12 '15 at 10:37
  • And now Microsoft Owns your App and your experience - This is crazy! Good Bye Free Programming! – Rusty Nail May 30 '16 at 11:13
2

Store Apps can only be started by the shell as far as I know. So try this:

explorer.exe shell:AppsFolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App

Or from run (Win+R):

shell:AppsFolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App

Have a look at this article for more details on opening and creating shortcuts: http://winaero.com/blog/exclusive-how-to-start-a-modern-app-from-desktop-without-going-to-the-metro-start-screen/

0

This is probably a Metro app, which aren't supposed to be deployed using a Setup, but rather using the Store.

Sören Kuklau
  • 19,454
  • 7
  • 52
  • 86
  • Thank you for your comment Soeren. Absolutely. Unfortunately however the store takes up to 7 days to approve and we need the app for an event in 2 days. – Mike Nedelko Nov 11 '15 at 21:13
  • There are some environments in which you can side load it, or you can present it from a deb machine. Other than that, them's the rules. – Sören Kuklau Nov 11 '15 at 21:14
  • Understand.Thank you Soeren. Will keep this in mind. But any workaround and/or other advice to make this work would be highly appreciated! – Mike Nedelko Nov 11 '15 at 21:18
  • 1
    One thing you can try is write a script that will change the local group policy, then install the .appx using powershell. https://www.maketecheasier.com/install-windows-8-apps-without-storewindows-8/ but that's kinda hacky, not MS-sanctioned, haven't tried it myself, and YMMV. Definitely something you'd only want for the interim as an emergency solution. – Sören Kuklau Nov 11 '15 at 21:23