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

前端 未结 10 1081
执笔经年
执笔经年 2020-12-09 14:47

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:

相关标签:
10条回答
  • 2020-12-09 15:23

    I had the same problems. I had to change file rights. Unmark "read only" in their properties.

    0 讨论(0)
  • 2020-12-09 15:27

    For those with this kind of problem - another solution: Pay attention also to Warnings when you build solution. For example, I had referenced a dll built with higher version of .NET (4.5.2) than my main project (4.5) After I referenced a dll built with 4.0 build process was successful.

    0 讨论(0)
  • 2020-12-09 15:27

    You are not set the startup project so only this error occur. Mostly this problem occur when your working with more project in the single solution.

    First right click on your project and "Set as Start Up Project" and/or right click on the start up file inside the sleeted project and click "Set StartUp File".

    0 讨论(0)
  • 2020-12-09 15:33

    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.

    0 讨论(0)
  • 2020-12-09 15:36

    Try these:

    1. Make sure that output path of project is correct (Project > Properties > Build > Output path)

    2. Go in menu to Build > Configuration Manager, and check if your main/entry project has checked Build. If not, check it.

    0 讨论(0)
  • 2020-12-09 15:38

    In my case I had added a project to a solution manually, where that project was targeting a higher .NET version than the rest of the projects that were referencing it. Strange... there would normally be a somewhat more verbose, literal and descriptive error in such cases.

    There wasn't a real error but there was a warning that said as much.

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