Sirop4ik
Sirop4ik

Reputation: 5243

How to add project as a dependency?

I created the UtilsHub solution that contains Utils class, which needs to use methods from another external project WinFormsUtils. So I added this project to my solution

enter image description here

Then because of my UtilsHub project needs to use WinFormsUtils I added it as a dependency

enter image description here

But anyway when I try to include the dependency in a file it doesn't work

enter image description here

What am I missing?

Upvotes: 1

Views: 536

Answers (1)

Jasper Kent
Jasper Kent

Reputation: 3676

There are two slightly different concepts here: dependencies and references. Project A can depend on project B for many reasons, all of which require that project B is built first.

A reference is a particular kind of dependency (and by far the most common), meaning that project be actually needs to use the contents of the project B dll in its code.

So you need to right-click on Dependencies under UtilsHub (in your first screenshot) and choose Add Reference and select WinFormsUtils to make it a full-blown reference.

Upvotes: 1

Related Questions