“The application could not be started.” error when debugging a Windows 8 Metro Style App

I ran across this today and wanted to share the fix.  I have seen it crop up both XAML/C# and HTML/JS projects and has to do more with how the app is registered. 

The error appears when you attempt to debug your Windows 8 metro Style App you will be prompted with a dialog informing you the application could not be started.

 

UnabletoStart

 

Clicking on Yes for more information will show you the id of the Metro Style App and point you to the Debug->Windows->Output window.  Unfortunately looking in the Output window doesn’t give you much information either.

 

AppID

 

The goods news is the fix is simple!  Simply exit out of Visual Studio 11 Beta and navigate to the solution file of your project. Once there delete everything inside of the bin folder.

Binfolder

Then open the project back up in Visual Studio 11 Beta and it should deploy correctly for debugging!

-Dave

 

You may also want to check out my previous Windows 8 Metro Style Development Tips: