Imports namespace

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I'm trying to import a namespace that I created in another project and
cannot get it to show up in the Imports list. The project has been
added to the current solution (which that shouldn't matter anyways) and
it builds properly. Am I missing something?

Thanks
 
You need to add a reference to your project. Adding it to your solution is
just something that allows you to see both projects at the same time in the
same IDE window. That is all it does.

The 'Imports' statement is just a shortcut so you don't have to type out
OuterNamespace.InnerNamespace.SomeClass, and instead you could just refer to
it as SomeClass.

So these are both convenience things, but are in no way associating the 2
projects together.

You need to go under references, and add the other DLL as a reference to
your project.
 
Thanks all. I forgot about the reference part.
I knew that adding to the project didn't make a difference I just
couldn't remember how to get it into the imports list.

Thanks again.
 

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

Back
Top