For some reason I need to check in a couple of files in the bin\Debug directory. For the past few weeks, I am noticing a strange behaviour from VS2005. Every time I recompile the code, it is deleting the .svn folder in the bin\Debug directory and hence svn is showing "obstructed" error. Even svn clean up doesn't help due to missing .svn folder. Is there any settings on VS2005 to prevent this? In the first place, why it is deleting .svn folder? This thread http://svn.haxx.se/tsvnusers/archive-2008-10/0019.shtml discuss about it but no useful solution to prevent this from happening. Any other suggestions?
views:
154answers:
4visual studio 2005 is deleting the .svn folder in the bin\Debug directory - how to prevent this?
Why would you want to checkin some file to the bin directory? This is entirely wrong. Even if there are valid reasons. Yes I mean it.
Consider having another folder which might contain the necessary files that you want to write to bin. After building, have a post build script that copies these files into the bin folder
You dont. if VS cleans up the bin directory it deletes all content. This is to have a clean start - in case people put additional thigns in with a post build event script. Makes sense. /bin and /obj are VS managed temporary directories and not supposed to be under version control.
This is the one thing I also dont like about SVN - it is a lot more stupid than all other souce control integrations I ahve seen about ignoring the stuff Visual Studio does not want under source control in the first place.
Why do you need to commit the code in the bin/Debug folder? Usually bin folder is marked as "ignored". I think you are doing someting wrong.
Don't store files in the bin\Debug
directory. Rather:
- Store the files somewhere else (your solution directory, or a project directory)
- Include the files in the solution or a project, and
- Copy the files to the output directory during build by setting "Build Action" to "None" and "Copy to Output Directory" to "Copy if Newer" or "Copy Always"
Or:
- Put the files in a separate folder, and
- Copy them to the output directory through a post-build script