tags:

views:

42

answers:

2

We are using Visual Studio 2008 professional. We have created an entity data model in our src\systeminfo folder. Since then our release and debug folder have a empty src\systeminfo folder. we don't need them. how to stop VS to create that empty folder structure? thanks

EDIT:

current directory tree:

project\Properties
project\References
project\src
project\src\common
.
.
project\src\systeminfo
project\src\util
project\App.config
project\Settings.cs
A: 

There is an option to 'Copy to Output Directory' on the properties window. Set it to 'Do not copy' for these folders

J Angwenyi
checked before the question, no that option for folders
5YrsLaterDBA
You have to select a file,NOT the folder for this option to appear.
J Angwenyi
my issue is those empty folders
5YrsLaterDBA
All files inside that folder are NOT TO COPY
5YrsLaterDBA
I'd say try 'Clean' build and see if the empty folders were not created a long while ago. Pls check out this:http://stackoverflow.com/questions/221803/visual-studio-2008-clean-solution-option
J Angwenyi
yes, 9 out of 10 I do clean first and then rebuild solution
5YrsLaterDBA
+1  A: 

You'd have to dig through the msbuild .target files to find out what build rule creates this folder. You might get a hint from looking at the build log if you switch it to diagnostic. Tools + Options, Project and Solutions, Build and Run.

A more pragmatic approach would be to just delete the folders in a post build event. Like:

if exist "$(TargetDir)src\systeminfo" rmdir "$(TargetDir)src\systeminfo"
if exist "$(TargetDir)src" rmdir "$(TargetDir)src"

Even more pragmatic is to not worry about it...

Hans Passant