Find out why Visual Studio decides to copy DLLs into a bin directory

我只是一个虾纸丫 提交于 2019-12-25 00:50:18

问题


I have a web application project. I am trying to find out why certain DLLs are being copied into the bin directory of the web application. As far as I can see there are no references to the DLLs under the list of references.

Whilst I don't think it should make a difference, I have been through all the DLLS of the projects that the web application depends upon and selected Copy Local=False.

But still when I build the solution, the DLLs turn up in the bin directory. I don't want them there. How can I find out what is putting the DLLs there?


回答1:


An indirect reference perhaps?

That is, you reference assembly A and it references assembly B and C. Presto! B.dll and C.dll are in your bin folder. Use reflector or ildasm to check the references of the assemblies you have referenced in you project.




回答2:


Check out your Post-build events which you can find in Project Properties->Build Events->Post-build event. There might a command-line instruction to copy a DLL into your bin directory.



来源:https://stackoverflow.com/questions/1705738/find-out-why-visual-studio-decides-to-copy-dlls-into-a-bin-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!