I want to create a folder inside a C# project to contain some configuration files. However, I don't want these files to be copied to bin\Release\MyFolder
. I'd rather have them copied to bin\Release
directly. I'm thinking this may be doable by having a "virtual" folder, like solution folders, but I don't know how to do it. Is there a way to create a virtual folder in Visual Studio 2008 (C#) projects? Or even better, how can I specify that the (text) file output should be directed to the main output folder?
views:
1438answers:
2
A:
In the Solution view (View|Solution Explorer), right-click on a project and select Add -> New Filter. Type in a name for the filter (which looks like a folder in your project) and then you can add existing files to the filter by right-clicking and selecting Add -> Existing Item.
Rob
2009-01-26 08:03:20
Is this VS 2008? I don't seem to have these options.
Gerrie Schenck
2009-01-26 08:11:45
Me too, I can't find the filter option.
Hosam Aly
2009-01-26 08:26:40
This is in VS2008 Pro. It works in VS2005 as well. No idea why this would be missing!
Rob
2009-01-26 08:35:41
I have 2008 Pro as well, but I still don't find it!
Hosam Aly
2009-01-26 08:59:29
New Filter is as far as I know only available for Visual C++, not the .NET environments. I guess it will be lost for C++ as well in 2010 because the project format will be the same as for the .NET languages.
OregonGhost
2009-01-26 11:17:27
Thanks. It's certainly a solution, but I was hoping I could find something simpler.
Hosam Aly
2009-01-26 08:28:13
You can choose the output folder regardless of where your files are kept.Right click on project and select properties. Click on Output tab.
Sir Psycho
2009-01-27 12:40:15