0
votes

I am having a problem running my Windows Application Forms in Visual Basic. It keeps on giving me this error:

( Visual studio cannot start debugging because the debug target'C:\Users\hp\ducuments\visual studio2010\Projects\Crystaltest2\Crystaltest2\bin\Debug\Crystaltest2.exe' is missing. please build the project and retry, or set the OutputPath ans AssemblyName properties appropriately to point at the correct location for the target assembly).

I have tried to build the project but i cant get anything from it also I tried to copy the code in another project but it did not work. Can someone please assist me with steps to solve this issue. I am using Visual Basic/ Visual Studio 2010

Thank you

1
So, to confirm, your build fails. Is that correct? - Andrew Mortimer
yes sir when i try the build it doesn't work - Bijad Boutarrada
@BijadBoutarrada if the build fails, there's no program to debug. Fix your code first. Post the compilation errors. - Panagiotis Kanavos
Click 'View -> Error List' and have a look at the errors. - Andrew Mortimer
Did you add Imports <Assembly Reference Here> at the top of your code? - doom87er

1 Answers

0
votes

Check your code and make sure you aren't missing a curly bracket anywhere. If one was accidentally deleted, moved, or misplaced, it causes this error among MANY others depending how critical the placement of the curly bracket is in your project.

^

I just recently had this problem in a project I was working on. I had highlighted to delete a section of code, and it took out a curly bracket with it. Unnoticed by myself, it took me a few days to finally realize that's what happened.

You won't get an error from the bracket missing, so it's stupid in itself and impossible to find at times.. but I had 51 errors, 7 warnings, and that "can't start debugging because the debug target is missing" error when I attempted to run the program, after the curly bracket went missing.

It's not to say that you might not have another issue going on that is causing this, but the curly brackets can wreak havoc if they aren't precisely placed. So it's worth checking into that before getting too extreme in options to "fix" the start error.

Good luck!