Elvis Dukaj
Elvis Dukaj

Reputation: 7378

Add reference from Visual Basic project to C# DLL

I've a Visual Studio solution that built some .Net DLLs written in C#. The DLLs are then copied to another path defined in environment system variable.

Now I want to add this DLL as reference to another Visual Basic project without specifying the full path but just... %LIB_PATH%\csharpdll.dll

Is it possible?

Edit I'll write better my question: I'm using Visual C# and VB 2010 express. I've a C# project that I'll call CShartProject as shared library. Now I want integrate this project into an exiting VB project. Unfortunatly I cannot have mixed language solution with express edition...

Now the solution must be shared from 2 remote pc... so I want avoid relative paths. What can I do?

Upvotes: 0

Views: 1583

Answers (1)

Victor Zakharov
Victor Zakharov

Reputation: 26454

Project Properties -> References -> Add... Reference -> Browse tab, then browse to your C# DLL.

Regarding relative paths, your best bet would probably be to leave absolute paths on development machine and then set up PATH to point to your %LIB_PATH%. This way you have it working on a remote machine as well.

It is always best to make project references. This makes it more developer friendly. For example, another developer can checkout your branch, open solution and have it working without modifying environment variables. Also, you can debug your C# code and commit those changes, if needed.

Upvotes: 1

Related Questions