VS 2015 - WP8 - "A specified communication resource (port) is already in use by another application."

702 Views Asked by At

I have a solution with the followings:

  • WP8 project
  • WP8.1 project
  • UWP project
  • Xamarin.Android project
  • PCLs

I have both VS2013 with Update 5 and VS2015 with Update 1 installed on my PC.
The OS is Windows 10.0.10586.318.
It is a fresh install as I reinstalled the whole PC due to other reasons.

Note: Before the reinstall I used VS2015 with Update 2 (and VS2013 with Update 5) but the same issue occured. So installing Update 2 does not seem to be a solution.

In the Configuration Manager the Android, WP8 and WP8.1 projects are checked in "Deploy" column.

I would like to use the WP8 emulator to debug my WP8 project.

  • In VS2013 it works as expected.
  • In VS2015 I can debug the WP8 app in the WP8.1 emulator but not in the WP8 emulator.
    The deploy is successful but the following error message appears:

A specified communication resource (port) is already in use by another application.
In the statusbar: Launching TaskHost.exe failed.

In the output window:

1>------ Build started: Project: X.Y.WP8, Configuration: Debug Any CPU ------
1>  X.Y.WP8 -> D:\Programs\DotNET\Visual Studio 2015 Projects\Y\X.Y.WP8\Bin\Debug\X.Y.WP8.dll
1>  Begin application manifest generation
1>  No changes detected. Application manifest file is up to date
1>  Begin Xap packaging
1>  Creating file X.Y.WP8_Debug_AnyCPU.xap
1>  Adding .... (lots of files)
1>  Xap packaging completed successfully
2>------ Deploy started: Project: X.Y.WP8, Configuration: Debug Any CPU ------
2>Deploying D:\Programs\DotNET\Visual Studio 2015 Projects\Y\X.Y.WP8\Bin\Debug\X.Y.WP8_Debug_AnyCPU.xap...
2>Connecting to Emulator WVGA 512MB...
2>The application is already installed on the device. Checking if an incremental deployment is possible...
2>Doing full deployment as project was cleaned and rebuilt...
2>Uninstalling the application...
2>Installing the application...
2>Updating information related to installed files...
2>Deployment of D:\Programs\DotNET\Visual Studio 2015 Projects\Y\X.Y.WP8\Bin\Debug\X.Y.WP8_Debug_AnyCPU.xap succeeded.
========== Build: 1 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

When I try to start debugging only one instance of VS2015 is running and nothing else.

I read lots of answers regarding same or similar issues but none of them worked.

  • Fortunately I don't have any non-Latin char in my user name.
  • Tried deleting the contents of ...\AppData\Local\Microsoft\Phone Tools\CoreCon\ folder.
  • Restarted VS2015.
  • etc.

What does VS2013 know what VS2015 does not?

As a workaround, for the WP8 project:

  • I can use VS2013 to use the WP8 emulator.
  • I can use the WP8.1 emulator in VS2015.

But the goal is to be able to use WP8 emulator in VS2015.

1

There are 1 best solutions below

2
Ruben Rivero On

use the WP8.1 emulator in VS2015.