I set up Visual Studio 2010. I wrote a simple code which I"m certain is correct but unfortunately, as soon as I run the code, I obtain the error below.

You are watching: Visual studio unable to start program the system cannot find the file specified

Here is mine code:

#includeusing namespace std;int key (){ cout and here is the error:

Unable come start routine "C:UsersSoheilDesktopNew foldersamDebugsam.exe The mechanism cannot uncover the record specified

Would you help me solve the issue? need to I specify the job in aspecific directory? I"ve spent a ton of hrs to settle this worry andhave no had any type of success yet.



This is a very first step for someone that is a beginner. Very same thing happened to me:

Look in the Solution Explorer box to the left. Make certain that over there is actually a .cpp paper there. You have the right to do the exact same by feather the .cpp document where the .sln file for the job is stored. If over there is no one, climate you will obtain that error.

When adding a cpp paper you want to use the Add new item icon. (top left v a yellow star on it, float over the to see the name) because that some reason Ctrl+N does not actually include a .cpp file to the project.



Encountered the same issue, after downloading a project, in debug mode. Searched for hrs without any type of luck. Following resolved my problem;

Project nature -> Linker -> Output file -> $(OutDir)$(TargetName)$(TargetExt)

It was formerly pointing to a folder the MSVS wasn"t to run from whilst debugging mode.

EDIT: shortly as i posted this I came across: unable to begin "program.exe" the system cannot discover the paper specified vs2008 which describes the same thing.


I have actually recently not offered VS 2010.

Does your application really develop correctly? to get more control in VS 2010 C++ Express, you can check menu article "Expert Settings" under Tools>Settings to acquire a Build" menu.After clicking Build->Build systems (or Rebuild), you might verify in Output home window (View->Outout), if your applications is compiling and also linking correctly.

Sources :

Hope it helps.

I understand this is one old thread, however for any future visitors, the cause of this error is most likely because you haven"t built your job from build > build Solution. The factor you"re obtaining this error once you shot to run your job is since Visual Studio can"t uncover the executable file that should be developed when you build your project.

As others have mentioned, this is one old thread and even with this object there tends to be various solutions that functioned for various people. The solution that functioned for is as follows:

Right Click task Name > PropertiesLinker > general Output paper > $(OutDir)$(TargetName)$(TargetExt) as indicated by
ReturnVoidClick ApplyFor every little thing reason this initial mediate didn"t resolve my difficulty (I"m making use of VS2015 ar to build c++ program). If friend still get the error message shot the following added steps:

Back in project > properties > Linker > general > Output record > You"ll view the previously gone into text in bold

Select Drop down > choose "inherit from parental or task defaults"Select ApplyPreviously bold font is no much longer bold

Build > Rebuild > DebugIt doesn"t make due to the fact that to me to call for these extr steps in addition to what
I came throughout this problem and also none of these solution operated 100%

In enhancement to ReturnVoid"s answer which suggested the change

Project properties -> Linker -> Output file -> $(OutDir)$(TargetName)$(TargetExt)

I needed to changed

Project properties -> C/C++ -> Debug Information layout -> /Zi

This field was blank for me, transforming the components to /Zi (or /Z7 or /ZI if those room the layouts you want to use) enabled me come debug

For me, ns didn"t have actually my startup project collection in systems Explorer.

Go come Solution explorer on the left that VS, best click her unit test project, and choose "set together startup project".

See more: How Old Is Miss Nikki Baby, Wiki: Net Worth, Brother, Parents

I had actually just porting my password to a new workspace, and forgot that as soon as I opened up the task in VS in the equipment there, the I needed to re-set mine startup project.

I know this object is 1 year old yet I hope this help someone, my problem was the I needed to add:

#include "stdafx.h"to my project (on the an initial line), this appears to be the instance most that the time!

I obtained this trouble during debug mode and also the missing record was from a static library i was using. The trouble was solved by using step over instead of action into during debugging

if vs2010 set up correctly

check document type (.cpp)

just build it again it will automatically fix,, ( if you are using VS 2010 )

I had actually a exact same problem and also i might fixed it!you should include C:Program papers (x86)Microsoft SDKsWindowsv7.1ALibx64 for 64 bit system/ C:Program documents (x86)Microsoft SDKsWindowsv7.1ALib for 32 little bit system in home manager-> Linker-> General->Additional library Directories

maybe it have the right to solve the problem of someone in the future!

Since this thread is among the top results for that error and has no solve yet, I"ll post what I uncovered to settle it, originally uncovered in this thread: construct Failure? "Unable to begin program... The device cannot discover the document specificed" which command me come this thread: Error 'LINK : deadly error LNK1123: failure during conversion come COFF: file invalid or corrupt' after installing intuitive Studio 2012 relax Preview

Basically all ns did is this:Project properties -> configuration Properties -> Linker (General) -> enable Incremental Linking -> "No (/INCREMENTAL:NO)"

Highly active question. Earn 10 reputation (not count the association bonus) in order to answer this question. The reputation necessity helps safeguard this concern from spam and non-answer activity.

Not the prize you're spring for? Browse other questions tagged c++ visual-studio or ask your own question.

Unable to start program 'MYPATH.exe'. The device cannot uncover the record specified. When i try to operation a new 'hello world' console application
My C password isn't translate in on intuitive Studio 2017 and also keeps giving me one error speak it can't discover the details file?
site architecture / logo design © 2021 ridge Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.11.5.40661

your privacy

By clicking “Accept every cookies”, girlfriend agree stack Exchange deserve to store cookies on your an equipment and disclose details in accordance v our Cookie Policy.