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

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.
 
J

Janaka

If this was written in VB.NET it shouldn't pose a problem - was the dll
written in VB 6 or earlier?
 
G

George W.

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.)
 
J

Janaka

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top