Problems with namespaces...
-
I have a class in a Class Library project called "Foo". Here is the class... Namespace Foo Public Class Bar Shared Function HelloWorld() As String [...] End Class End Namespace I have compiled this and put the .dll Assembly into the \bin directory of a 2nd project. Project 2 is called HelloWorld2 and is a Windows Application which has a reference to the Foo.dll assembly added to it. Problem is the Import statement I need to use to access HelloWorld. I would have thought it would be Import Foo ... Public Class Form1 .... Private Sub Form1_Load(...) Handles MyBase.Load labal1.Text = Bar.HelloWorld() End Sub End Class End Sub But it seems I have to do Import Foo.Foo Why the extra Foo? Bah humbug!!
-
I have a class in a Class Library project called "Foo". Here is the class... Namespace Foo Public Class Bar Shared Function HelloWorld() As String [...] End Class End Namespace I have compiled this and put the .dll Assembly into the \bin directory of a 2nd project. Project 2 is called HelloWorld2 and is a Windows Application which has a reference to the Foo.dll assembly added to it. Problem is the Import statement I need to use to access HelloWorld. I would have thought it would be Import Foo ... Public Class Form1 .... Private Sub Form1_Load(...) Handles MyBase.Load labal1.Text = Bar.HelloWorld() End Sub End Class End Sub But it seems I have to do Import Foo.Foo Why the extra Foo? Bah humbug!!
I had the same problem recently. But I thought it may have been to do with the fact that I already had a namespace called Foo in an existing C# library. Kevin