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. Visual Studio
  4. Moving file to the output directory

Moving file to the output directory

Scheduled Pinned Locked Moved Visual Studio
question
3 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.
  • L Offline
    L Offline
    Le centriste
    wrote on last edited by
    #1

    I have a .config file that must reside in the same directory as the application. How do I make move to the output directory each time a build is performed?

    A 1 Reply Last reply
    0
    • L Le centriste

      I have a .config file that must reside in the same directory as the application. How do I make move to the output directory each time a build is performed?

      A Offline
      A Offline
      Andy Davey
      wrote on last edited by
      #2

      If its named app.config (for windows and console applications) and resides in the root of your project, VS.NET will do this for you automatically (and rename it to the name of your executable). Otherwise if you have another .config file (say foo.config) you can set the Build Action (right click on the file and select Properties from within VS) to content. I'm pretty sure then that VS will copy the file to the output directory when it performs its build. HIH Andy

      L 1 Reply Last reply
      0
      • A Andy Davey

        If its named app.config (for windows and console applications) and resides in the root of your project, VS.NET will do this for you automatically (and rename it to the name of your executable). Otherwise if you have another .config file (say foo.config) you can set the Build Action (right click on the file and select Properties from within VS) to content. I'm pretty sure then that VS will copy the file to the output directory when it performs its build. HIH Andy

        L Offline
        L Offline
        Le centriste
        wrote on last edited by
        #3

        Andy Davey wrote: If its named app.config (for windows and console applications) and resides in the root of your project, VS.NET will do this for you automatically (and rename it to the name of your executable). Didn't know that ! Tx. Andy Davey wrote: Otherwise if you have another .config file (say foo.config) you can set the Build Action (right click on the file and select Properties from within VS) to content. I'm pretty sure then that VS will copy the file to the output directory when it performs its build. Already tried that, and it didn't work.

        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