C# why empty src folders are copied to the debug and release directory after build?
We are using Visual Stu开发者_如何学Cdio 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
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...
There is an option to 'Copy to Output Directory' on the properties window. Set it to 'Do not copy' for these folders
精彩评论