How to add entlib to VS solution

Topics: General discussion
Apr 6, 2007 at 7:35 AM
Hi all,

This is a noobie question I guess.

How should Enterprise Library be added to Visual Sudio solutions?

What I have seen so far at work is each entlib project (e.g. Data Access app block) added with all its source code to the solution. Is this the correct way?

I don't see the point of adding all of the source if the code isn't going to be changed anyway. I'd prefer to just add references to the DLLs... but I'm not sure if this will possibly screw up paths to the DLLs if the solution is checked in and out of source control into different directory structures... etc.

What do you all recommend?

Apr 6, 2007 at 4:48 PM
We generally recommend taking bining references to EntLib blocks (and any other shared components) in your own applications. Even if you do plan to modify the EntLib code to suit your own needs, it's generally better to do this in a dedicated solution to avoid fragmenting the code for each project.

Apr 6, 2007 at 10:24 PM
Edited Apr 6, 2007 at 10:25 PM

As to your concern of different directory structures.
As long as you keep internal directory structures the same, no problem will happen
for instance

in ssafe:
$\sourcecode\Shared (keep your entlib dll's here, don't use the program files)

then user a can get '$' to c:\source
and user b can get '$' to d:\src

In this way, in both user's local copy of the source, the folderlayout within the working directory will be the same.

if project a then has a ref to entlib (in the shared folder), then for both users there will be no problem since the paths are kept relative.

Best regards,