VS/VB/Namespaceshttp://forums.asp.net/t/329686.aspx/1?VS+VB+NamespacesFri, 05 Sep 2003 01:21:56 -0400329686329686http://forums.asp.net/p/329686/329686.aspx/1?VS+VB+NamespacesVS/VB/Namespaces I am a C# developer, but am trying to convert code over to VB so that other developers can reuse it in their projects. I created a project, "Oh", which is an ASP.NET project. Now, I want to set the namespaces to all of the pages to something specifically so that I can ensure they are logically where expected, which is fine in C# - we'll call this namespace, "SpankMe.Daddy". Well, when I compile the project, everything works beautifully. When I execute it, I get an error: Could not load type 'Oh.SpankMe.Daddy._Default'. Well, I explicitly specified the namespace as "SpankMe.Daddy", so why is it placing it in the Oh namespace, too!?!? That makes no sense at all. Is there any way around this flaw? Any help is appreciated. Thanks in advance. 2003-09-04T17:32:15-04:00329696http://forums.asp.net/p/329686/329696.aspx/1?Re+VS+VB+NamespacesRe: VS/VB/Namespaces I don't think you need convert C# code over to VB for .net component. You can complie it to dll and put it in /bin folder of the vb project. 2003-09-04T17:40:28-04:00329714http://forums.asp.net/p/329686/329714.aspx/1?Re+VS+VB+NamespacesRe: VS/VB/Namespaces I stated this wrong. When I go to the page, the error is: Could not load type 'SpankMe.Daddy._Default'. The problem is that Visual Studio seems to tack on the namespace I specify to the project's default namespace, which makes it, Oh.SpankMe.Daddy._Default. 2003-09-04T17:48:33-04:00329715http://forums.asp.net/p/329686/329715.aspx/1?Re+VS+VB+NamespacesRe: VS/VB/Namespaces I don't want to do that because the pages are intended to be a "starter kit" where other developers can modify them as needed and even suggest improvements and so on. 2003-09-04T17:49:59-04:00330087http://forums.asp.net/p/329686/330087.aspx/1?Re+VS+VB+NamespacesRe: VS/VB/Namespaces You need to remove the root namespace from the project file. This is a quirky VB thing to hide "complexity" of namespaces, but its a huge pain in any real team development if used as is. 2003-09-04T23:00:27-04:00330207http://forums.asp.net/p/329686/330207.aspx/1?Re+VS+VB+NamespacesRe: VS/VB/Namespaces That will work for my project, but what about the people that use the starter kit? Maybe it's just my opinion, but I wouldn't want to use something that mandated my default namespace to be blank...Wait, is that even possible? That seems wierd that the compiler would allow code that is not in a namespace. At this point, however, I would not doubt it. I will have to accept this as the way ahead until I find a better way to do this. Honestly, this whole conversion activity has solidified my reasons for using C#. If anyone finds a better way to handle this situation, please let me know. Thanks. 2003-09-05T01:10:47-04:00