9 Referencing Other Projects in Yours When Using Console.Waterworks.Core
Craig Oates edited this page 3 years ago

From a personal point-of-view, I like to keep "plumbing code" and "business logic" separate. The most common approach I take to do this is create various library projects and reference them in the main project. This all happens in the same solution if I can help it. Because of this preference, I designed Console.Waterworks.Core (C.W.C.) to operate with this as the default context.

Because this repository does not utilise this set-up, I will provide you with a link to another project which does. It is called Wet Pancake and the links for its repository and wiki are as follows:

Within Wet Pancake is a .Net Standard Library (written in F#) and a .Net 4.7 console project (written in C#). The console project uses Console.Waterworks (C.W.) and references the F# library (yes, two different languages). I am hoping this is convincing enough for you.

For the sake of completeness, here is a quick overview of Wet Pancakes' set-up.

wet pancake overview

In more generic terms, here are a couple of diagrams to help explain where/how C.W.C. slots into your project.

multi-library referencing example

library referencing example

An important note to make is your must call the code from another library inside the command-methods.

If you are unsure how to reference a .Net library in another project, within your solution, use the following link for more information: