1

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
5YrsLaterDBA
  • 33,370
  • 43
  • 136
  • 210

2 Answers2

1

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
  • 922,412
  • 146
  • 1,693
  • 2,536
0

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

Julius A
  • 38,062
  • 26
  • 74
  • 96