Add VB.NET reference to C#

  • Thread starter Thread starter muralidhargvn
  • Start date Start date
M

muralidhargvn

Hi,

I have a C# and one VB.NET projects in my solution explorer. I want to
add VB.NET's

reference to C# project. Is it possible?

Thanks,

GVN.
 
hi,
Yes add a reference to existing project. All .NET Languages can
communicate with each other.

James Jenkins
 
Thanks Mr James. I have another question. When I attempted to add a
reference, my C# application is expecting the reference in the form of
a DLL, instead, its an EXE in case of VB.NET.
 
Ya, I got it. This can be achieved if we change the VB.NET project's
output type as class library. By changing the output type as class
library, it generates a dll which can be added as a reference to C#
application.
 
Hi,

In that case you cannot add it,

What you can do is create a new project with all the Vb.net features you
want to share and move it to a DLL (class library) project.
 
Actually, in .NET 2.0, you can set a reference to EXE files (VS.NET
supports this as well).

Whether or not it is actually a good idea, however, is debatable.
 
You can also do this in .NET v1.1, but only if you complie you application
using the command line. The Visual Studio .NET 2003 IDE does not allow you
to reference an *.exe assembly, but it is possible through the command line.

Nicholas Paldino said:
Actually, in .NET 2.0, you can set a reference to EXE files (VS.NET
supports this as well).

Whether or not it is actually a good idea, however, is debatable.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ignacio Machin ( .NET/ C# MVP ) said:
Hi,

In that case you cannot add it,

What you can do is create a new project with all the Vb.net features you
want to share and move it to a DLL (class library) project.


--
 

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

Back
Top