allow the Global keyword for namespace declarations in VB.NET
It should be possible to define a namespace like this:
Meaning that the specified namespace (MyCompany.MyLibrary) is an absolute Namespace and should ignore the default namespace defined at project level.
If I have a VB.NET - project with a default namespace, say "MyCompany.MyProduct" and 50 files representing classes, enums etc. and now there comes one new class that thematically belongs to another assembly (say "MyCompany.MyLibrary"), but because of cross-reference-restrictions I have to include in this assembly but with the namespace of the other one, then I have to remove the the default namespace from the project and add 50 times a
around all my existing code which is less-than-ideal, and also if I (or the marketing department) decides for a better name right before shipping, then I have to replace the namespace again 50 times...
I feel your pain. You’re right, one shouldn’t have to redo their entire project to add a one-off namespace. Happily, as another has mentioned already this has been fixed in VB2012 http://blogs.msdn.com/b/vbteam/archive/2011/09/27/announcement-namespace-global.aspx
You can now use the Global keyword as the root of a namespace declaration.
Anthony D. Green, Program Manager, Visual Basic & C# Languages Team
Arjan van Huizen commented
The Global NameSpace keyword is available in Visual Studio 11
See this MSDN Blogpost: http://blogs.msdn.com/b/vbteam/archive/2011/09/27/announcement-namespace-global.aspx