Reputation: 25729
Error: a specified communication resource (port) is already in use by another application
My output is:
1>------ Deploy started: Project: Proj1, Configuration: Debug Any CPU ------
1>Deploying C:\Users\Валентин\Projects\Proj1\Bin\Debug\Proj1.xap...
1>Connecting to Emulator WVGA 512MB...
1>The application is already installed on the device. Checking if an incremental deployment is possible...
1>Doing incremental deployment...
1>Updating information related to modified files...
1>Deployment of C:\Users\Валентин\Projects\Proj1\Bin\Debug\Proj1.xap succeeded.
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
Last status bar message:
Launching TaskHost.exe failed
I'm using VS2012 express for WP, WP 7.1 project on WP8 emulator, Windows 8 64 bit.
The curious part is that it worked fine earlier, but for some reason stopped working today.
Please share your ideas.
Upvotes: 14
Views: 9965
Reputation: 5657
There is a workaround:
Right click on your project and select Deploy. This will copy all necessary code to the emulator. After that you are free to hit F5 like normal.
Original article http://blog.masterdevs.com/a-specified-communication-resource-port-is-already-in-use-by-another-application/. Thanks Josh.
Upvotes: 7
Reputation: 1
Well, i too had the same Error: a specified communication resource (port) is already in use by another application
and i tried this, it works for me.
You just open the Project.sln
file in Blend for visual studio. Go to menu>project>Run project
!!! It installs the Xap file to your mobile without any error.
Upvotes: 0
Reputation: 1
I had the same problem and it turned out to be an issue with the network connection. Try to launch the debug session with your machine being disconnected from any network.
Upvotes: 0
Reputation: 5773
I tried the other answers without luck, what it solved to me was deploying the application (right click on the project -> deploy) on the device or emulator, after that port was free again to enable debug.
Upvotes: 2
Reputation: 1544
In my case all above solutions didn't work.
So, what I did to solve my same problem:
I manually deleted the Bin
and obj
folder from my Project which is automatically generated on every project build. I rebuilt the solution and deployed it to Emulator. This solved my problem.
Upvotes: 0
Reputation: 539
This is solved very easily.
Microsoft.Phone.Controls.Toolkit.dll file add in the Service Refrence folder.
Then In project right click on "sevice refernce" folder > include in project.
rebuild the project
Run the project successfully
Upvotes: 0
Reputation: 8670
This always happens the first time I launch the debugger and startup the Windows Phone emulator. Here are the steps I follow to get around this.
1) Start the debugger and let it launch the emulator 2) It times out (usually) 3) Close the emulator 4) Start the debugger again and let it re-launch the emulator
For some reason the first time it launches it can never connect for me.
Upvotes: 1
Reputation: 4962
I had this occurring when trying to debug the app on my device. I fixed it by uninstalling the app and redeploying it.
Upvotes: 8
Reputation: 307
I had the same problem, decided to try it: If You have an account Microsoft contains Russian name and a surname, then you need to switch to a local account containing English letters, run under it VS and then debug an application is running, then you can return to your account Microsoft and debugging will also work.
Upvotes: 1
Reputation: 21
I was getting this same error and coundn't figure out why. I stumbled upon this solution (see link below) and remember that I had changed my namespace and that was the issue.
If you go into your csproj file, make sure this has changed.
<SilverlightAppEntry>TheOldNamespace.App</SilverlightAppEntry>
Reference :
Windows Phone 7 - App doesn't start, no errors, just bails on load
Upvotes: 2
Reputation: 26351
Run XdeCleanup.exe
, and try restart your computer as well. Usually does the trick around here.
Upvotes: 1