Thursday, January 15, 2015

The application could not be launched for debugging

Short version


If you're faced with the message "The application could not be launched for debugging. Ensure that the target device screen is unlocked and that the application is installed" when starting your Windows Phone project and you've recently installed Update 4 for Visual Studio 2013 then reinstall the update. If that doesn't work, follow the long version to get some hints on what to try next.

Long version

This message was thrown in my face by VS when trying to start a WP-project that I'm currently working on.

"The application could not be launched for debugging. Ensure that the target device screen is unlocked and that the application is installed."

Seemed to appear after I updated Visual Studio 2013 Ultimate to Update 4. My collegue running the same setup does not experience this issue, even after Update 4. The app gets installed but the debugger can't attach.

Most common scenarios to solve this seems to be the ones below, however it didn't work for me.

  • Deploy-option not checked in Configuration Manager
  • WP project is not set as the start up project
  • Corrupted auto-generated files (clean and/or delete obj/bin folders)

I went on to update the Windows phone 8.1 Update 1 SDK. You just need to download the MobileTools_EmulatorWP81GDR1.exe, it will fetch whatever stuff needed. If you want the entire installation offline, pick the .iso file.

Windows Phone 8.1 Update 1 SDK and Emulators
http://www.microsoft.com/en-us/download/details.aspx?id=43719

No luck there... Still the same message...

Restarting Windows? Nope...

Wndows update? (.NET Framework 4.5.2 found) Downloading, installing, not working.

Started a new project to see if there is something in my project causing this. But no...

Tried to change the language on the emulator. Parallels crashed. It's really not my day.

In the end, reinstalling Update 4 for Visual Studio 2013 was the thing that helped me. Download it from https://www.microsoft.com/en-us/download/details.aspx?id=44921.




2 comments:

  1. Same issue, no success after all foreseeable avenues tried. :(

    ReplyDelete
  2. Thanks. Every time something lie this happens, and it's surprising how often some new problem shows up, I forget to delete my obj and bin directories. Doing a "clean" on the project is never enough. So again, thanks for the reminder to really clean out everything possible.

    ReplyDelete