Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependencies and references - What exactly should I reference?

I am wondering what to include when building my project. I have a library I need to reference for my project to build but that library has 10 dependencies itself. Should I reference those dependencies as well or should I copy them to the output directory using a post build event?

What is the best practice?

I find it confusing to include all those dependencies as the project compiles fine without them - are they then called runtime dependencies? My references become cluttered with dependencies irrelevent to my project even though they are used in some library I am including.

I am using Visual Studio.

Can someone please give me some insight into how to do this right.

Thanks.

like image 768
Fadeproof Avatar asked Oct 15 '22 18:10

Fadeproof


1 Answers

It's just opinion. Either way will work.

Personally I hate post-build BAT files, so I would include the dependencies to get them copied to the output directory.

Another option is to put a link to them in your project - like in a resources directory. Have this set to BuildAction=None, and CopyToOutputDirectory=CopyIfNewer

like image 152
GeekyMonkey Avatar answered Oct 19 '22 11:10

GeekyMonkey