How to copy referenced assembly's dependecies to ASP.NET output bin folder?
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" f开发者_StackOverflow社区or assembly C.
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.
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.
精彩评论