views:

25

answers:

2

Hi all,

In Visual Studio 2010, I have project A (asp.net application). Project A references project B (class library). Project B references assembly C (direct reference to a DLL).

When building project A, only project A and project B binaries are present in the /bin directory of project A, but not the assembly C. Why is that? If project B depends on assembly C, why is assembly C not copied together to the output folder?

"Copy local" is already set to "true" for assembly C.

Any information would be appreciated. Thanks!

+1  A: 

This is because library C will be copied to the output directory of library B and that directory is different from library A. If you make both A and B to build to the same directory you will see library C output there.

Igor Zevaka
A: 

I managed to workaround the issue by adding this variable to a class in project B:

private Type t = typeof(SomeClassInAssemblyC);

Now when I build project A, both project B binaries and assembly C DLL are copied to the /bin directory of project A.

LD2008
Another thing that I noticed is that if you reference a DLL that is in your file system and also installed in the GAC, it won't be copied to the /bin directory when the project is built.
LD2008