Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Publish Not Copying All DLLs to Publish Folder

I have a Web Project A which is my startup project and I publish from this web project.

A refers to another project -> B (A has project reference to B)

B contains a reference "ref.dll"

When I build B, all DLLs of B including "ref.dll" gets copied to bin folder of A

However, when I publish A, I cannot see the "ref.dll" in the published folder.

I learnt somewhere that Visual Studio is intelligent enough to not copy a DLL if the any of it's methods are not being used anywhere. In my case, I have verified that methods in "ref.dll" are being used.

Why is it so? Do I need to explicitly add reference to "ref.dll" in WebProject A, for it to appear in the publish folder?

like image 376
Aniruddha Pondhe Avatar asked Apr 19 '16 09:04

Aniruddha Pondhe


1 Answers

Try setting Copy Local = true for the dll which is in project B.

enter image description here

like image 189
Anwar Ul-Haq Avatar answered Nov 11 '22 10:11

Anwar Ul-Haq