Link to home
Start Free TrialLog in
Avatar of onholdmarketing
onholdmarketing

asked on

Project Builds fine but doesn't create an executable

I get the following message box

"visual Studio cannot start debugging because teh debug target "<path><project>/projectname.exe' is missing Please build the project and retry, or set the OutPutPath and AssemblyName Properties appropriately to point to the  correct location for the target assembly.

Avatar of so3
so3
Flag of Romania image

Click on the project properties and on the Build tab set the output path to /bin/debug and then rebuild your project.

The executable can not be found and that's why you get the error. Check the output path and assembly name to be correct from project properties and the rebuild the project

Avatar of onholdmarketing
onholdmarketing

ASKER

This how it is set already.
ASKER CERTIFIED SOLUTION
Avatar of so3
so3
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It is in a folder called /obj  why is it there?
When you build the project also puts the assembly and the files in the obj  folder. You have to copy the exe file from obj in bin\debug.

After rebuilding your project if you still get the error type this to copy the file automatically.

In you Visual Studio solution properties choose Common Properties->Post-Build Event Command Line, and type:
copy "$(ProjectDir)OBJ\DEBUG\$(TargetFileName)"  "$(ProjectDir)$(OutDir)$(TargetFileName)"

Everytime you will build the solution, the file will be copied to the folder with the binary.