CS0234 when using a VB assembly in my C# web app

  • Thread starter Thread starter George W.
  • Start date Start date
G

George W.

I'm trying to use a DLL in my web app and get CS0234 (Namespace error).

Is there no way to use a DLL that was written in VB in a C# web app??

-George W.
 
If this was written in VB.NET it shouldn't pose a problem - was the dll
written in VB 6 or earlier?
 
No, it was written in VB.NET. But, when I have my ASP.NET pages set to
language="c#", the assembly does not work. If I change to language="vb"
and change nothing else, it works fine. Maybe there's something else I'm
missing? Is it possible that the VB assembly contains obsolete VB6 code?
Otherwise, I can't think of what would cause it. But if I'm compiling in
VS.NET 2003, shouldn't it be enforcing VB.NET? (I'm a newbie to VB, only
have experience with C# as far as .NET goes.)
 
Sorry i didn't look at the error you mentioned. .NET doesn't care if you
write your code in VB.NET, C#, J#, C++ or any other managed language because
these all compile into IL. Your Namespace error is probably due to a
namespace collision with an existing namespace. For example if you've tried
giving a namespace already associated with .NET such as System.Data you will
not be allowed to use.

Sorry I can't think of any other cause for this error?
 
Back
Top