A Quick Solution to Resolve a WP App Deployment Issue



Today while deploying one of my new Windows Phone 7 application to my unlocked WP7 device, I noticed that, it is not deploying it due to connection error though the device is connected properly and able to sync with the Zune Software.

 

Later after doing lots of brain storming I was able to fix the problem and thus sharing the solution here in case you came across similar issue while deploying.

 

What was the Issue?

I had a fresh new system with Windows 8 Ultimate (64-bit), Visual Studio 2012 Update 1 and Windows Phone 8 SDK. It was the first time I was building an app for Windows Phone 7 in that system and thus I needed to test it in my physical Windows Phone device. But while trying to deploy, I got a deployment failure message in the screen that says:

 

“Error    1    Connection to device failed. For connecting to Windows Phone 8 device - Deployment failed because no Windows Phone 8 phone was detected. Make sure a phone is connected and powered on.
For Windows Phone 7 device - Failed to connect to the device. Ensure that the device is completely booted and is connected to the PC.”

 

And in the Visual Studio error list, it was displaying as shown in the below screenshot:

 

WP7 Application Deployment Failed from Visual Studio 2012

 

I tried to deploy in the physical device several times but both the time I was facing the same issue. Tried in the emulator and it was working perfectly there. I opened the “Application Deployment Tool” that comes with the SDK but there also I was getting the same error message as shown below:

 

XAP Deployment Failure from the WP Application Deployment Tool

 

First I thought that it could be a connection error as the message stated but next time I realised that the Zune software is already connected to the device and was able to sync the data available on my phone device. Then what’s wrong? After thinking for several times, I rebooted my system and also rebooted my Windows Phone; no good result though.

 

After trying lots of other good/bad possibilities, I thought to repair the installation of the WP8 SDK as the WP7 SDK for Visual Studio 2012 comes with the same. But before doing that, I thought to try deploying it once again and this time fortunately or unfortunately (whatever you say), the deployment was successful. At that point, I was not aware of the reason behind it.

 

Started breaking my heads once again to find out the reason but this time instead of the deployment error, it was the reason that it worked.

 

The Exact Reason behind this Issue

Finally after spending little more time, I found the exact root cause behind it. Yes, it was the exact reason. The Wi-Fi of the Windows Phone was turned ON while deploying the application XAP file in it. When the same was not there, it was able to deploy it perfectly.

 

To confirm myself on this serious issue, I reproduced it once again with the Wi-Fi settings turned ON and then turning OFF it. Yes, that worked. Bloody hell, there were no documentation of this from the WP Team.

 

Summary

So if you came to this situation in your system or a friends of yours, first check whether the Wi-Fi settings is turned ON in the phone (developer unlocked). If it is, try deploying it once again after switching OFF the Wi-Fi connection. I am sure that it will work for you too irrespective of the system you are trying to.

 

If that didn’t work and you find a different solution for that, do share it in the comments section and help others to resolve it quickly by following your steps. I hope that, this post was helpful for you if you came here by searching it online. Though it was a lengthy one describing the issue and my steps towards resolving it, but I think that it was needed to tell you the exact steps I followed. Happy coding.

25 comments

  1. hehehehehehe... You did so much so brainstorming. The moment I read this problem ,I Had the solution .
    If data connection is on ,apps won't be deployed :-P :-P

    ReplyDelete
  2. This error message is pathetic. Whoever has written should be fired immedietly. I've seen this couple of time. And there are many things to consider. Wifi is first. Then check for ZUNE, Pictures, Video libraries as well.

    ReplyDelete
  3. I am facing a Problem of not able to execute my applications, I get an error of network switch, emulator closes itself. I read somewhere we need to manage something in the hyper v but not able to successfully complete it.

    ReplyDelete
  4. I am getting an error with the emulator, failed to create virtual Ethernet switch, what should be done for that?

    ReplyDelete
  5. to add onto this

    the same problem doesn't not happen with wp7.1 using VS 2010 express with windows phone.

    for Vs2012 it happens , solution is to off wifi as written here. subsequently i can turn my wifi on again and the next deployment is fine

    ReplyDelete
  6. I am unable to deploy application . As i am getting [Unable to install application. The maximum number of developer applications on this phone has been reached. Please uninstall a developer application and try again.]
    I am clue less here . Please help me here .

    ReplyDelete
    Replies
    1. Looks like there are many applications have been installed in your Phone device from your Visual Studio. You have to uninstall a developer application from your phone device first before installing a new one.

      Delete
    2. Hi Kunal ,
      First of all thanks for your reply ,
      But i have a brand new Phone having no application(developer applications) Installed .

      Delete
    3. And My Phone Is Unlocked and Registered for Developer .

      Delete
    4. I see, there might be something wrong then. Can you contact the developer support center? They might be able to help you on this case. Let me know, what they say.

      Delete
    5. Hi,
      Ok I'll let you know .
      Thanks

      Delete
  7. I am having the same error as Sanjay, I had to hard-reset my phone and now after unlocking it again its saying the maximum number of apps installed has been reached!

    ReplyDelete
    Replies
    1. Consult with developer support centre. They will be able to resolve this issue.

      Delete
  8. I am getting an error phone ip over usb transport when registering for windows phone dev. I have started the services but even then getting the same error. Some time I also get another error saying phone name is too short to register. What am I suppose to do????

    ReplyDelete
  9. How to deploy windows phone 8 in VMware Workstation (I'am use VMware Workstation 9)
    VMware workstation did't connect to the phone either.. (Portable Devices)
    How to solve it??
    I'am run windows 7 machine. I can run the emulator wvga 512MB..(just information)

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Thank you, thank you! I was beginning to lose my mind already, nothing seemed to work, and I was unable to deploy. But, as far as I can remember, having Wifi turned on never caused me problems before..? Anyway, thank you once again. :)

    ReplyDelete
    Replies
    1. You are welcome Danijel. Glad to know that the post helped you :)

      Delete
  12. Hi Kunal,

    Good article!! Well followed the issue resolving steps starting from resetting the device and later checking the application on/off settings.

    ReplyDelete
    Replies
    1. Hi Sreevani,

      Glad to know that it helped :)

      Delete
  13. Thanks,

    Turning the Wi-Fi off, also worked for me. However, I am still concerned about this problem. Sometimes I am able to deploy with Wi-Fi on, sometimes not. And what if I need to test device connectivity?

    Best Regards,
    Kostas

    ReplyDelete
    Replies
    1. Hi Kostas,

      I am not aware of such behavior but please check for other possibilities like Data Connection, Bluetooth etc. Make sure to open the Zune software first and connect the device, if you are using Windows Phone 7 device. Hope it helps.

      Delete
  14. I've no idea why I haven't been able to deploy. The device had been registered before, and it shows up in file explorer. But re-running the registration software or trying to deploy all say no device can be found. Despite it showing up in file explorer. Also, I've tried turning off WiFi and data, and combinations of both. Any suggestions?

    ReplyDelete
    Replies
    1. Raise a support ticket in Windows Phone Dev Center. They will be able to assist you on this.

      Delete
  15. Cool it works with Windows Phone 8.1 too.
    Thanks :)

    ReplyDelete


 
© 2008-2014 Kunal-Chowdhury.com | Designed by Kunal Chowdhury
Back to top