Why does one project (exe) not see the namespace of another project (dll) in the same solution?

Why does one project (exe) not see the namespace of another project (dll) in the same solution?

+7
c #
source share
4 answers

First you need to add the link from the project using this project to the DLL.

Choose project | Add link, tab "Projects".

+14
source share

The "solution" in Visual Studio is a collection of projects. Each project is independent of all others. This is just a convenient way to organize projects and open them together.

If one project will use public objects defined in another project, it must be compiled with reference to another project. This is true whether the projects are part of one solution or not.

To tell Visual Studio that the EXE needs to be compiled with a reference to the DLL, you must add the DLL to the list of EXE links in Solution Explorer.

+5
source share

You need to add a link to the DLL.

Right-click the EXE project, click Add Link, go to the Projects tab and select the DLL.

Also, make sure the classes in the DLL are public .

+2
source share

It looks like you need to add a link to the dll

Right click on the project -> Add Link

0
source share

All Articles