0

Since a couple of days I have a little problem with XNA that it doesn't want to start up my game. When I click Start or F5, the error message from Microsoft Visual studio is:

Visual Studio cannot start debugging because the debug target 'C:\users...\projectname\bin\x86\debug\projectname.exe' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly.

To give a little more information, this is a school project and we are using sourcetree and git to share our files. What I have tried is:

  • Removing 'bin' and 'obj' folders from the files and rebuilding it.
  • Cloning the project again in another folder.
  • Restarting PC/Microsoft Visual Studio (long shot, because there is a files missing)
  • Googling the problem, couldn't find anything

Nothing has worked and now I am here, asking you if you have had this problem/know how to solve it?

Update: Because I had errors in my project, I couldn't build it. After commenting them out, I could and so rebuild my project.

Tuit1995
  • 1
  • 1
  • Visual Studio is telling you about project properties. Right click your project (the code one, not the content pipeline) in VS, click properties and check what values are there in OutputPath and AssemblyName. Tell us the values if you can't fix them. – Alexey Jan 12 '16 at 12:16
  • Also check http://stackoverflow.com/questions/3516333/debug-target-is-missing for answers – Alexey Jan 12 '16 at 12:57

3 Answers3

0

It seems like you are missing the exe file for your project. Have you checked the folder in your file browser. May you moved it or deleted it or renamed it. I would open a explorer to the project and search for all exe files like *.exe and maybe it will pop up. If it doesn't pop up. You lost your exe. Maybe recompile? Hope this helps.

JPA1123
  • 1
  • 2
  • Didn't work, I tries these(but also didn't work): 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. – Tuit1995 Jan 14 '16 at 19:59
0

As JPA1123 already mentioned you will probably really just need to recompile your project/solution via right click on your solution and 'Rebuild Solution'. Also check if the 'Build' checkbox is checked for all relevant projects in the 'Configuration Manager'.

Bashn
  • 314
  • 1
  • 6
0

I found this question when i tried to solve my own problem with same symptoms, so: If you get missing exe error after opening project on other machine (with git as example), just make sure you choose right solution platform! It will be "any cpu" by default, in my case i need to change it to x86.

enter image description here

nuclear sweet
  • 1,079
  • 10
  • 27