Unable to start debugging. The startup project cannot be launched

Viewed 8260

I'm trying .NET Core today inside Visual Studio 2017. However, it seems I'm unable to debug the application even with barebone Hello World project.

Every time I try to start the project, the following message box appear:

Error Message

I've searched similar issue and come across this thread: Unable to start debugging. The startup project could not be launched. VS2015

I tried every single answer there and nothing worked in my end.
Is there something I missed?

Thanks in advance

7 Answers

I had the same problem (Visual Studio 17.3 and 17.4). I was able to solve today. It turned out that the cause was an extension. After deactivating this extension I was able to debug again.

Edit: In my case it was the "Arduino GDB for Visual Micro 2017".

I close VS2015 and restart, the problem is solved.

I had the same problem with Visual Studio 2019. I had to disable Azure IoT Edge Tools for VS 2019 extension from Visual Studio. After that, I just restarted Visual Studio and it allowed debugging.

enter image description here

If you came here looking for a fix due to converting from .NET Framework to .NET Core the problem is your Solution file.

Do this, make a new project with the same name. Copy the .sln file and replace yours. Open the solution and the problem should be fixed.

The first two lines for one made in Visual Studio 2019 are:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16

If your using an old one you might have something like so:

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010

Might just be able to change the format, I haven't tested that, but in my case those were the only differences as well as:

VisualStudioVersion = 16.0.30611.23
MinimumVisualStudioVersion = 10.0.40219.1

For me the project were located in another project. After carrying it in another location the problem was gone!

Related