Thomas Levesque
Thomas Levesque

Reputation: 292465

Some Windows Store apps won't start, why?

I just noticed that an app that I developed a few days ago won't start on my Surface RT. It was working fine right after I deployed it (from Visual Studio), but now nothing happens when I touch the tile (I get nothing at all, not even the splash screen). I first thought the problem was specific to Windows RT, but I checked on my PC and the same thing happens.

Is this because the app was deployed from Visual Studio, rather than from the store? Is there a way to make it work permanently without publishing it to the store (since it's not ready yet)?

Upvotes: 1

Views: 375

Answers (1)

Nate Diamond
Nate Diamond

Reputation: 5575

If the app isn't starting from your coding environment, then you have an error happening sometime at launch, such as in the App constructor. If you've used the Remote Debugger to deploy it to your Surface and are asking if you can open the app after it's deployed, I believe the answer is that you cannot. You can, however, make an app package that can be installed on your Surface, assuming you have a Developer's License on your Surface, which, if you're Remote Debugging into it, you should.

If you go to Project -> Store -> Create App Package..., a dialog will pop up. It will ask if you want to create an App Package to upload to the store, set it to "No". You will then have to select any versioning increments you desire, along with what architecture you want to build it for. (Assuming you're not using the C++ libraries, Any is fine).

Now, go to your Project folder. In your folder should be a folder called AppPackages. Go in there, and you'll see two things (assuming this is your first time making an App Package), a '.appxupload' file and a folder that share the same name as your app. Inside the folder is your actual '.appx' and the method to install it, a PowerShell, '.ps1' script. Zip the folder and get it to your Surface. You can email it, share it from your machine, put it on a USB drive, any number of ways.

From there, when it's on your Surface, unzip and open the folder. Right click the PowerShell script (should be titled "Add-AppDevPackage.ps1") and click "Run with Powershell". You will be prompted to change the security policy, select 'y', and if you don't have a Developer's License or Sideloading Key, you'll be required to get one now. The script will install your app on your Surface. You can then use it just like you got it from the store.

Note: You may need to uninstall the deployed version of your app currently on your Surface. If you remote debug through VS to your surface, it will overwrite the LocalState of the packaged version. You can, however, Debug an Installed App Package using the remote debugger, so that you don't have to do that kind of thing. If you included the Debug Symbols in the App Package, you should be able to hit all of your breakpoints as well (and not just exceptions).

Happy coding!

Upvotes: 1

Related Questions