C# Debug - cannot start debugging because the debug target is missing

Viewed 142010

I am fairly new to C#..

I am using Visual Studio 12, the source I am using was last edited in VS 12.. But my problem is that it's throwing me this error: enter image description here

First of all, my computer username isn't Martin, it is Administratoring - The creator of this project is Martin.. So that's where I guess it's coming from, but I don't know how to fix this.

I have tried editing in Project > Properties > Build > Output Path - And it still doesn't work. I am not too familiar with C#, and I've spent some time searching up for a solution but can't find it anywhere.. Probably because I don't know what I should be searching up (I've tried searching keywords and quotes from the error, but still nothing)

14 Answers

Application Property

Switch Target framework to 4.5.2 or something higher and bring it back to your original version (example: 4.5) then when you build, it will work.

Go to Project > properties > Debug Tab and set the Launch to "Project"

So... it’s mid 2021 and I’m using visual Studio 2019 (version 16.10.2) which is the current version available, on a windows 10 pc.

I had to start a new project and following this steps solved the issue;

  1. When at the menu that says “Create new project”
  2. After you’ve selected your project template it takes you to another menu that says “Configure your new project”
  3. On this menu there’s an option that says “Place solution and project in the same directory”.
  4. By default this option was not checked, so I checked it and it solved the issue.

I had the same problem with visual studio 2015 , and I found that there is reference is marked so I just deleted it , maybe you can delete this reference or reinstall it again

What solved it for me was deleting the line

<ImplicitUsings>enable</ImplicitUsings>

from the project property file. It caused Visual Studio to generate a (useless) file with multiple global using directive.

I faced the same problem , but in my solution i had many projects so in the solution configuration the start up project was by mistake a class library i changed the startup project and then i worked like a charm

right click on the sln => common proprties => choose right startup project .

Related