• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 361
  • Last Modified:

creating namespace in vs2008 in vb.net?


I created the following projects in VS2008
ProjectName      Assembly Name      Root namespace
MyApp.GUI      MyApp      MyApp.GUI
MyApp.Model      MyApp      MyApp.Model
MyApp.View      MyApp      MyApp.View
MyApp.Prop      MyApp      MyApp.Prop

I am trying to access other classes from one of the class and it won't let me access them.

Say I have the following classes:
MyApp.View.Page1 class
MyApp.Model.ModelOne class

from page1 class, I would like to access the ModelOne class.
When I try to import the namespace, I don't see teh MyApp.Model.

This is really easy in C# but can't seem to get this right.
Can you help?

I just want to manage my projects by this way, MyApp.xxxx project...etc

I even tried leaving the Root namespace as blank and , explicityly putting the namespace in the file.
I am not getting the success.
  • 2
1 Solution
if all these are separate projects, you have to add references to them and then use Import directive
dkim18Author Commented:
Hm. Thank you. I didn't realize that I had to add refereces to other projects.

I don't remember adding references in c# projects I worked before.
I must have forgotten.
if you have separate assembly then it has to be referenced somehow, hasn't it ;)

sometimes VS is clever and adds dependencies for you while you're within the solution, but if you don't see your classes in Object Browser it defo means it's not referenced

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now