Incorrect Namespace

  • Thread starter Thread starter Huzaifa Patanwala via .NET 247
  • Start date Start date
H

Huzaifa Patanwala via .NET 247

I have created an enterprise template project MCMSystem under myVisual basic .net solution. Under which I have various projectssuch as DataAccess Which has a class patient and others. I havespecified the namespace for this class to beMCMSystem.DataAccess. Now when I want to access this class fromanother project I have to give the import statement as importsDataAccess.MCMSystem.DataAccess.Patient and not asMCMSystem.DataAccess.Patient

How can I resolve this.
 
Open your Project Properties (right click on your project name in solution
explorer pane). Remove the default namespace value under Common
Properties/General.
HTH
 
Huzaifa said:
I have created an enterprise template project MCMSystem under my Visual basic .net solution. Under which I have various projects such as DataAccess Which has a class patient and others. I have specified the namespace for this class to be MCMSystem.DataAccess. Now when I want to access this class from another project I have to give the import statement as imports DataAccess.MCMSystem.DataAccess.Patient and not as MCMSystem.DataAccess.Patient

How can I resolve this.

Probably not the right group (csharp) but if you right click on your
project and select properties then select common properties >> General,
if you clear the Root Namespace, your namespaces should be exactly as
they are declared. (The same way it works in c# (although c# puts in its
default namespace from the project properties but that is visible
instead of invisible in VB)

HTH

JB
 
Back
Top