Debug Target Is Missing?

后端 未结 19 2135
南笙
南笙 2020-11-27 20:24

When I try to build my solution, I get the following error:

Visual Studio cannot start debugging because the debug target \'c:\\target\' is missing. P

相关标签:
19条回答
  • 2020-11-27 21:12

    Although this has already been answered, I found that my own solution was none of the above. Admittedly a rookie mistake, within my solution I had multiple projects, and thus when trying to run solution, the wrong project was set as the Startup Project.

    So in my own case, not to say others, the solution was to right click the project and select Set as Startup Project

    0 讨论(0)
  • 2020-11-27 21:16

    I had a very very similar problem, but almost non of the solutions worked for me, finally when i reset the VS setting, it fixed... To reset settings:

    • Tools Menu >
    • Import and Export Settings >
    • Select Reset all settings radio >
    • Next >
    • Next (You can backup your current settings in this step) >
    • Finish
    0 讨论(0)
  • 2020-11-27 21:18

    This was a really annoying error!

    I kept trying to start a debug instance but it just wouldn't make an exe! Though there were errors in my ConnectionString (while trying to make an SQL connection). There were two backslashes that were supposed to be a part of a path and the tutorial I was following told me to ignore it.

    Well, turns out that was the error. A backslash marks the beginning of some escaping that you want to do, and the way to have a backslash displayed is \\ instead of \.

    Got rid of that, and it worked for me.

    EDIT: It would seem that you have to get rid of the tiny errors that you have made while writing your code to let it compile properly.

    0 讨论(0)
  • 2020-11-27 21:19

    I had the same problem and the real solution was embarrassingly easy:

    If, in your project, Visual Studio has never successfully compiled the program (before finding the first bug), you will get this error. What I did was remove all offending code (in my case, leaving just a simple button1_Click with no code). Run/Compile the code one time; exit the running program, and this message goes away.

    The Compiler builds various directories and files on a first successful compile and these are used by the debugger. I am now recommending with all new projects, define the form, compile, close, and then begin coding.

    0 讨论(0)
  • 2020-11-27 21:20
    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-11-27 21:21

    You can try the following steps to resolve the problem.

    Step 1:

    Right click on the solution and select the property

    Step 2:

    In Configureation property select the Build option button

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