views:

1463

answers:

5

Ok, so I have VS 2008 and SVN. When I "rebuild all" a handful of my .dll's disappear from my bin folder.

I have these .dll's in a library folder and that's where I am referencing them from.

When I go to publish the app the publish fails, I think they are related. When I reboot my web.config (change something and save) this error goes away. However, the publish still fails.

When I go to the folder and update svn puts all of them back of course, but then it just happens all over again.

Thank you.

A: 

Sounds like the build procedure removes the contents of your bin directory on build.

I don't understnad where you say you are referencing them from the library folder- and they also exist in the bin directory.

Your publish could be failing for other reasons- it is most helpful to post the errors.

Updating SVN reverts the files to the latest version- so if you have no file, the latest version is the one that exists in your repository.

Things to check:

  • You are probably receiving errors on your build- it sounds like the DLL's are actually output from other projects in your solution, so you should check if they are building properly or if they are being output to a different directory instead of your bin folder.

  • Your subversion repository probably shouldn't have any binary or intermediate files such as dll, lib, exe, suo, ncb, and some others but those are the main ones.

  • Post more details here- from the sound of it, it seems you may be overlooking errors that you didn't post here.

Klathzazt
no, I 'm building fine, individual projects are builiding fine. I agree that chiecking in some .dll's isn't a great idea, but I don't think taking them out will help.
Sara Chipps
+2  A: 

You need to specify "Copy Local" on your references, This will copy them out of the library folder into your bin directory. Usually you only should be keeping one copy of the DLLs in Source Control (in the library folder). If you have the bin folder source controlled, you may run into problems building.

Robert Wagner
That'd be my guess!
Slace
A: 

I've seen this before when using Rebuild - I fixed it by marking those reference dll's as ReadOnly in their Explorer attributes.

Yeah, it's hacky, but it kept VS's paws off my dlls!

Jarrod Dixon
+3  A: 

I assume that by "Bin" folder you mean the build location where Visual Studio assembles the executable version of your application.

Generally, I've found that making manual changes to the Bin folder is a good way to encounter "a new world of pain". My problems went away as soon as I started letting Visual Studio do what it wanted with the directory and I left it alone.

If you have DLLs referenced from your project, mark them as "Copy Local" (select them in the Solution Explorer, configure in the Properties panel) and Visual Studio will ensure they're copied across for you.

A side note: As the Bin directory is managed by Visual Studio and is completely reproducible, I suggest that it (and it's sibling Obj) shouldn't be under source control.

Bevan
I had a similar problem but the DLL was referenced from the bin folder, once I added the reference and set "Copy Local" to false it stopped deleting it. Thanks!
Paulo Manuel Santos
A: 

You probably have a default web site and not a web application project.

EvilEddie