views:

201

answers:

3

I'm using SVN to version a ASP.NET web project that I'm working on. I have recently decided to try versioning published versions of the site. I commit these to the repository along with tagged Release versions of the code in the root of the branch. This is proving useful as I can deploy to my server using SVN.

Problem that I'm facing is that I've had to version some files in my project's /bin folder (DLLs without external references), which has created a /bin/.svn folder. Problem is that VS.NET's Publish command insists on copying the .svn from the development branch /bin to the output folder's /bin. This basically 'switches' the binary files in there to point to the dev branch. The result is that the contents of the /bin folder never actually get committed to the compiled bin folder, because the working copy is pointing to a different part of the repository.

Is there any way to force visual studio to ignore the .svn folder on publish? Alternately, is there another way to handle the inclusion of static .dlls in a project without putting them in the bin folder, so that the /bin can be excluded from SVN (as it should be) (not using the GAC)?

+3  A: 

I suggest that you don't version anything in the .bin folder. Instead put all of your referenced assemblies in a folder outside of your project folders. Then deploy it and build it where ever it is going. The build process will pull all of the dlls in as needed. This would then remedy your .svn folder in the bin folder issue!

Andrew Siemer
+7  A: 

Definitely do not put the bin folder in the repository. This will give you nightmares forever.

Just put your static referenced .dll's in a folder called "Libraries" or whatever, and set your project references to them. They'll be copied to the output automatically.

womp
Can you give some examples of svn bin problems? I had an issue where a commit would delete dlls without any acknowledgement.
Steve
The biggest issue is simply the conflicts it will generate. Every single build on any working copy will alter the .dll's in /bin. Doing an SVN Update will cause a conflict every time that will have to be resolved. Additionally, processes could have locks on your working copy so they can't be overwritten when you update, etc.... it's just an all-around huge headache.
womp
+2  A: 

Hmm.. Put them into a separate folder in the solution and reference them. Now why didn't I think of that (doh!). Think I've been staring at the screen too long.

Thanks all.

Adding an answer in reserved for... adding an answer. If you want to reply to one of the people that answered your question or make a general comment, then add a comment.
Hamish Smith