Link to home
Start Free TrialLog in
Avatar of deighton
deightonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Namespace

In some sample QAS code I'm looking at, there is a class called ProWeb, which is wrapped in a namespace

Namespace com.qas.proweb.soap

.
.
.
.
.

End Namespace

then other modules have an

Imports com.qas.proweb.soap


and that all works ok.



I've copied some of these modules to another project (including the 'Namespace com.qas.proweb.soap' one) and in my new project I can no longer do a 'Imports com.qas.proweb.soap', I need to give my new project name

Imports QASwebAndy.com.qas.proweb.soap



When I look in the object browser for the first project there's a namespace called 'com.qas.proweb.soap' and when I look in the object browser for the second project it's called 'QASwebAndy.com.qas.proweb.soap'.  

How do I avoid the include having to be called 'Imports QASwebAndy.com.qas.proweb.soap' and just use 'Imports com.qas.proweb.soap'  ???


I'm at a loss as to what is different between the two projects setup

Avatar of dtryon
dtryon

Hi,
I'm not sure about this but I could comment.  As you know, namespaces are simply addresses for finding some code kept inside them.  It looks to me that this com.qas.proweb.soap namespace is a web service.  Since the proxy of the web service is compiled in your dll (not an indepentent dll), I'd guess that .NET doesn't like it standing on its own.  The code that utilizes the web service needs to know where to find the service proxy.

So you may be stuck with it this way.

The only other thing I could mention is the assembly manifest.  As you are aware, all dlls have a meta data file (or manifest) that describes their contents.  There might be something in the manifest about which namespaces are contained in the dll.  Perhaps you need to register it there.

Good luck,
Davin
Avatar of deighton

ASKER

I think I've found it it's

'Project->Properties->General' then 'RootNamespace', which is normally equal to the project name, but they have set it to "" in their project
SOLUTION
Avatar of samtran0331
samtran0331
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial