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#!

3 Comments

Comments have been disabled for this content.