Imports in VB.NET

G

Guest

I just download a DLL from MS website for VS.NET 2005. I added it reference
to my project, and I have to add five [Imports] statements on top of each
class. It is burden.

I found that Microsoft Demo Project don't have [Imports] statement in the
class. How could they do that?

Thanks
 
C

Cor Ligthert [MVP]

Mike,

Be aware that those can be set in the solution properties as well.

Cor
 
G

Guest

Cor,

But how do I setup in Solution/Project property? I opened the raw solution
and project files, no information in two files. It must be in somewhere in
the project level.

Mike
 
O

Oenone

MikeZ said:
But how do I setup in Solution/Project property? I opened the raw
solution and project files, no information in two files. It must be
in somewhere in the project level.

Double-click on My Project for your project, and then select the References
tab.

The top half of this tab shows the references you are making to other DLLs,
the bottom half shows the project-level imports.

To add an import that applies to your entire project, either find it in the
list and check its checkbox, or type in the namespace to be imported in the
textbox at the top and click the "Add User Import" button.

HTH,
 
H

Herfried K. Wagner [MVP]

Cor,

Cor Ligthert said:
Be aware that those can be set in the solution properties as well.

.... in the project properties only ("My Project" -> ...).
 

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