“A specified communication resources(port) is already in use” when attaching the debugger

前端 未结 8 1922
灰色年华
灰色年华 2020-12-05 17:35

I have just upgrade my windows phone 8 to windows phone 8.1. When I connect my phone to pc and run my project it gives me

相关标签:
8条回答
  • 2020-12-05 18:30

    A specified communication resources(port) is already in use by another application

    This is a generic error for any failure when Visual Studio attempts to connect it's debugger. There is no silver bullet solution to this problem. The problem persists in Visual Studio 2013, and on Windows Phone 8.1. You'll often notice that the application is actually deployed, but the debugger just couldn't attach itself.

    However, uninstalling anything is never a correct solution to this problem.

    Now, generally the following options can fix the 'problem' (sometimes one or more are required):

    • Unplug, and re-plug the USB cable
    • Uninstall the application from the phone and redeploy from Visual Studio
    • Redeploy from Visual Studio
    • Restart the phone
    • Restart Visual Studio

    Bad USB cables or USB ports can also cause this issue.

    0 讨论(0)
  • 2020-12-05 18:32

    @Ajay, I have ran into exactly the similar problem after upgrading my device to phone 8.1

    I have two different machines, Machine1 runs VS2012 Premium with update 3, it prompted for update 4, but some unknown reason I cannot get this update installed on that machine. Machine2 runs VS2013 Professional with Update 1. After deploying an app to 8.1 device, Machine2 can run the debugger successfully, but Machine1 pops the aforementioned error window. I tried @LukkhaCoder approach, but it didn't help.

    Edit: You have to run your code in VS2012 update 4 or VS2013 to debug in a 8.1 device.

    0 讨论(0)
提交回复
热议问题