Is it Acceptable for Referenced DLLs to reside in the project's \bin\Debug folder?

Amos Moses was a wimp! "Rassling" alligators is nothing compared to this CE / CF Gordian Knotesque mass of spaghetti I'm dealing with.

In my latest gyrations to try to somehow coax this big ball of mud to at least compile and run, I notice that some of the referenced DLLs live in the project's own \bin\Debug folder.

Is that safe, and sound? It seems rather tail-chasey or circular-referencey to me. It appears to work, but...would I be better off moving those DLLs elsewhere?

UPDATE

To be clear, here is what is in \bin\Debug:

enter image description here

...in \bin\Release:

enter image description here

...and how the OpenNETCF* DLLs are referenced:

enter image description here

Upvotes: 2

Views: 275

Answers (2)

CodeCaster
CodeCaster

Reputation: 151586

A Clean of your project will not delete them and as long as they're in source control, you can't lose them.

This used to be practice when finding and installing the proper versions of third-party libraries and SDKs was a hassle. When the referenced libraries are included in the bin folder, they only have to be checked out from source control to work, instead of having to install the binaries from wherever on each new workstation and user, in the same location, in order to reference them properly and copy them on build.

Problems that can be solved using virtual machines or disk imaging for development machines, or properly archiving installers of said libraries.

This still doesn't mean the bin folder is a proper location. I'd opt for a Libraries or Third-Party folder, outside your project directory, preferably version controlled.

Now with the official NuGet package store and private ones you can use to share internal libraries, this shouldn't be a problem at all anymore for new development.

Upvotes: 2

Reed Copsey
Reed Copsey

Reputation: 564363

It appears to work, but...would I be better off moving those DLLs elsewhere?

In general, I would not recommend having that be the referenced location. It is common to have the referenced assemblies copied to that folder, but they should live elsewhere (and have their HintPath in the C# project file referencing the other location).

Upvotes: 3

Related Questions