开发者

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

Why one project (exe) does not see the namespace of another project (dll) in the开发者_JAVA百科 same solution?


You need to add a reference from the using project to the DLL first.

Select Project|Add Reference, Projects Tab.


A "solution" in Visual Studio is a collection of projects. Each project is independent of all the others. The solution is just a convenient way of organizing projects and opening them all together.

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

To signal to Visual Studio that the EXE must be compiled with a reference to the DLL, you must add the DLL to the EXE's list of references in the Solution Explorer.


You need to add a reference to the DLL.

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

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


Sounds like you need to add a reference to the dll

Right click on the project --> Add Reference

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜