I have a VS2008 I want to copy certain files from a directory into my /bin/
folder. I have set the files (located in /common/browserhawk/
) to "Copy to Output Directory". However, it copies the folder structure as well: the files are copied to /bin/common/browserhawk/
How do I get these files to copy to just /bin/
? I do not want to store these in the root of the website to get them to copy correctly.
Related Question: Visual Studio adds .dll and .pdb to project after compiling
Since I cannot comment on previous answers, I will put the solution here:
Adding to what @PaulAlexander provided, add the following to your .csproj/.vbproj file:
This allows you to select "RootContent" as the Build Action in the Properties window, and all can be accessed via the GUI. A more complete explanation: the "AvailableItemName" option basically creates a new named-list that you can assign items in the project to under the "Build Action" property in the Properties window. You can then use this newly created list in any Target you like (eg via "@(RootContent)").
I ended up adding a step to the nant build file to copy after successful compliation