Solution with C# and VB projects

M

Marty

I have a solution with a C# start-up project and a VB project. If
possible, how can I load the VB app from the C# app? Thanks.
 
W

W.G. Ryan eMVP

If they are both in the same solution, just go to the C# project, add
reference, then select the third tab and select the vb project.
 
M

Marty

I tried that but .NET says it must be a dll. Is there a way to do it
with a normal app?
 
C

Cor Ligthert

Marty,

A little bit longer answer as Bill (however it is the same)

Open you C# project.
Add in that your VBNet project

And than use the message from Bill.
Don't forget to build them before.

Cor
 
W

W.G. Ryan eMVP

Marty - like Cor mentions you should be good to go - unless you are using a
..exe project. If that's the case then you have an issue - you should
probably take out all of your classes and add them in a new class library
project, add the reference to it just build.

So you can't really add a reference to another executable - but you can
build the exact same project as a class library and reference away.
 
C

Cor Ligthert

doh,

I forgot.

You have to set your output in the properties from the VBnet project to
Class Libary.

Cor
 

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

Top