Tuesday, April 29, 2003 1:44 PM Jan Tielens

Root Namespace and Project Imports in VB.NET solutions

Jonathan Goodyear blogs about problems he had when trying to create build scripts for VB.NET solutions.

He writes: "VB .NET projects have two seemingly innocuous features built in that make enterprise development a bit of a challenge. The first of these features is called the root namespace, and is specified in the General section of the project properties dialog. The second feature is the project imports section, which can be found in the Imports section of the project properties dialog."

I must admit, when I tried to create my first build script for a VB.NET solution, I ran into the same problems. But it's quite easy to overcome these problems. I guess VB.NET hides a little complexity in Visual Studio.NET, once you get used to it, you pay the penalty when doing al the work manually... In this discussion James pointed out that the VB.NET compiler (VBC) has a /rootnamespace switch and a /imports switch, which you can use to imitate the properties mentioned above. Alternativly you can get rid of the Root Namespace property and Project Imports, and work like in C#!

Comments

# re: Root Namespace and Project Imports in VB.NET solutions

Tuesday, April 29, 2003 3:40 AM by Cory Smith

I've also added some comments about this to my blog if you are interested in reading them at http://www.addressof.com.

# LINK SOLUTION WITH OTHER SOLUTION

Tuesday, April 13, 2004 7:27 AM by BILAL BILAL

HOW TO LINK ONE SOLUTION WITH OTHER SOLUTION

# LINK SOLUTION WITH OTHER SOLUTION

Tuesday, April 13, 2004 7:27 AM by BILAL BILAL

HOW TO LINK ONE SOLUTION WITH OTHER SOLUTION

# re: Root Namespace and Project Imports in VB.NET solutions

Tuesday, July 10, 2007 12:36 PM by David Gray

Thanks for putting me on the trail to a solution to a type resolution issue in an ASP.NET application.

Having successfully built and used new namespaces and classes in C#, I was puzzled by the inability of the ASP.NET compiler to resolve the classes in a namespace that I created in a pure VB.NET assembly.