Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. change exe path

change exe path

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiodebugginghelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fedrer
    wrote on last edited by
    #1

    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.?

    L 1 Reply Last reply
    0
    • F Fedrer

      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.?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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.

      F 1 Reply Last reply
      0
      • L Lost User

        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.

        F Offline
        F Offline
        Fedrer
        wrote on last edited by
        #3

        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

        L 2 Replies Last reply
        0
        • F Fedrer

          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

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • F Fedrer

            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

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups