several projects

B

Bernie

Hi,

I cannot generate a solution with 2 projects inside cause of a problem with
the using statement.
first project has 2 namespaces :
Intel
Intel.utilities

2nd project has also 2 namespaces :
Intel.utilities
Intel.UPNP

using Intel.UPNP;

Private UPnPDevice upnpLightDevice = null; // where UPnPDevice is a class
from namespace INtel.UPNP in the 2ndProject

BUT at project generation , I have the error " UPNP does'nt exist in the
namespace Intel "

SO HOW CAN I SPECIFY THE USING CLAUSE TO USE THE 2ndproject Intel.UPNP

Hope I've been right understood

Bernie
 
D

Dan Bass

presuming your code is in the first project, you need to add a reference to
the second project.

goto: Solution Explorer -> <project name> -> References
right click and select "add reference"
then select projects tab, double click on the second project, then OK

retry now.
 
B

Bernie

Thank's DAn

but the second project is already added and i svisible in the solution
explorer !!!

MAybe I need to specify the 2nd project name within the using clause ,
that contains the namespace i want to adress ?
 
B

Bernie

Thank's but that doesn't work !
The problem is that right at the clause "using intel.UPNP" it detects an
error , telling that UPNP does not exists within the namespace Intel
So it does not see the name space "intel.UPNP" from the second project of
the solution

Let's think again DAn
 
N

NuTcAsE

Bernie check your project references. In the solution explorer, expand
References of the first project. Do you see the second project's name
listed underneath References? If not then you have to add a reference
to the project. Its not enough to add a project to the solution, you
have to manually add the reference to the project. Dan gave a good
example on how to add the project reference.

If you do see the second project listed underneath references, then
check the case in the using statement. If that is also correct, check
your UPnPDevice class and see if its access modifier is public. If its
not and its the only class in the second project, the namespace
Intel.UPNP will not be exposed.

Hope this helps.

NuTcAsE
 
B

Bruce Wood

Are you sure that you have the namespace name _exactly_ right?

In your posts so far you've said that it's Intel.UPNP and intel.UPNP.
Someone else posted something about Intel.UPnP.

Remember that C# is case sensitive. If the namespace is called
"Intel.UPnP" then you can't type "using Intel.UPNP" with a capital "N"
or C# won't find it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top