change exe path
-
Hello, Actually I have changed the path of generation of exe from Debug to some other folder in Visual Studio 2012. Its generating in desired folder but its not able to launch it becuase it still looking the exe in Debug folder while launching. Can you please help me to change the setting to run it.?
-
Hello, Actually I have changed the path of generation of exe from Debug to some other folder in Visual Studio 2012. Its generating in desired folder but its not able to launch it becuase it still looking the exe in Debug folder while launching. Can you please help me to change the setting to run it.?
-
Go to the project properties settings, by right clicking the project name in Visual Studio. Select the "General" node under Configuration Properties, and change the "Output Directory" setting.
-
Thanks for reply. This is what I am doing. Changing the output dir path will only change the creation of executable path. But when I run it using ctrl+f5 it gives error because program is looking the exe in old(debug) folder
Hi, For debugging this... right click on your visual studio solution and click 'Properties'. Go down to 'Build Events' and add a 'Pre-Build Event' and add the following two lines:
echo Debugging Path: $(TargetPath)
echo Executable Path: $(OutDir)$(TargetName)$(TargetExt)These should always be the same. The paths will be in your build output. Follow the instructions given by Richard MacCutchan and only change the 'Output Directory' located in the 'General' property page. I have a feeling that you mistakenly changed the 'Linker->Output File'. If I am correct... change it back to the default value of '$(OutDir)$(TargetName)$(TargetExt)' and follow his instructions. Best Wishes, -David Delaune
-
Thanks for reply. This is what I am doing. Changing the output dir path will only change the creation of executable path. But when I run it using ctrl+f5 it gives error because program is looking the exe in old(debug) folder
Go to the next node in Properties named Debugging, and change the Command entry from
$(TargetPath)
to the same path as you previously changed, followed by$(TargetFileName)
; you may need a backslash in front. But all of this begs the question: why? You are just storing up trouble for the future by not sticking to the defaults.