locked
How do I include a folder into the project so it will be copied into bin\Debug folder after I build the project? RRS feed

  • Question

  • Hi,
    How do I include a folder into the project so it will be copied into bin\Debug folder after I build the project?
    thanks.
    Monday, July 27, 2009 4:32 PM

Answers

  • Just add a folder in Solution Explorer.  If there is nothing within the folder, it will not be copied.  Add an item---anything, a text file even---select it, and change the property of the item to "Copy to Output Folder".  When the program is built and ran in Debug mode, the folder and your selected item will be copied into the "output folder".  It you have selected a Debug build or Relese build, you will get different results.


    Rudedog   =8^D
    Mark the best replies as answers. "Fooling computers since 1971."
    • Proposed as answer by David M Morton Monday, July 27, 2009 4:42 PM
    • Marked as answer by Harry Zhu Monday, August 3, 2009 2:50 AM
    Monday, July 27, 2009 4:39 PM

All replies

  • Just add a folder in Solution Explorer.  If there is nothing within the folder, it will not be copied.  Add an item---anything, a text file even---select it, and change the property of the item to "Copy to Output Folder".  When the program is built and ran in Debug mode, the folder and your selected item will be copied into the "output folder".  It you have selected a Debug build or Relese build, you will get different results.


    Rudedog   =8^D
    Mark the best replies as answers. "Fooling computers since 1971."
    • Proposed as answer by David M Morton Monday, July 27, 2009 4:42 PM
    • Marked as answer by Harry Zhu Monday, August 3, 2009 2:50 AM
    Monday, July 27, 2009 4:39 PM
  • Just add a folder in Solution Explorer.  If there is nothing within the folder, it will not be copied.  Add an item---anything, a text file even---select it, and change the property of the item to "Copy to Output Folder".  When the program is built and ran in Debug mode, the folder and your selected item will be copied into the "output folder".  It you have selected a Debug build or Relese build, you will get different results.


    Rudedog   =8^D
    Mark the best replies as answers. "Fooling computers since 1971."

    "Copy Always", on the "Copy to Output Folder" property, but still much better than my original response, which I deleted. 

    Mark Rudedog's post as answer.
    David Morton - http://blog.davemorton.net/ - @davidmmorton - ForumsBrowser, a WPF MSDN Forums Client
    Monday, July 27, 2009 4:46 PM
  • thanks guys.
    Wednesday, July 29, 2009 2:53 PM