c# - Dependent DLL is not getting copied to the build output folder in Visual Studio -


i have visual studio solution. have many projects in solution. there 1 main project acts start , uses other projects. there 1 project "projectx". reference added main project. projectx references .net dll (say abc.dll) isn't part of solution.

now abc.dll should copied bin/debug folder of main project, isn't getting copied there. why not getting copied, known reasons ?

i found if projectx referenced abc.dll didn't directly use of types defined in abc.dll, abc.dll not copied main output folder. (it copied projectx output folder, make extra-confusing.)

so, if you're not explicitly using of types abc.dll anywhere in projectx, put dummy declaration somewhere in 1 of files in projectx.

abcdll.anyclass dummy006; // enough cause dll copied 

you don't need every class -- once enough make dll copy , work expected.

addendum: note may work debug mode, not release. see @nvirth's answer details.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -