
Referencing a C# project within a VB.NET project
Hi all,
I have a small program written in VB.NET in which I add references to two
other projects in the same solution. One, called 'Data' is a VB.NET project
and the other, called 'TransactionDataAccess', is a C# project. The
TransactionDataAccess project also has a reference to the Data project. If
I reference the projects directly (by choosing them from the Projects tab in
the Add References form) and compile the whole solution, I get the following
errors:
D:\dev\Visual Studio Projects\tdavb\tdavb.vb(25): Reference required to
assembly 'Data' containing the type
'Liebermans.Common.Data.Constants.Transactions.RecordType'. Add one to your
project.
D:\dev\Visual Studio Projects\tdavb\tdavb.vb(73): Reference required to
assembly 'Data' containing the type
'Liebermans.Common.Data.TransactionData'. Add one to your project.
D:\dev\Visual Studio Projects\tdavb\tdavb.vb(25): Reference required to
assembly 'Data' containing the type
'Liebermans.Common.Data.TransactionData'. Add one to your project.
All three of these errors occurr when on lines of code in the main program
where I attempt to pass variables that have data types declared in the Data
(VB.NET) project to a method of a class declared in the
TransactionDataAccess (C#) project. However, if I remove all the direct
project references, and add references to the compiled DLL files, everything
works fine. Can anyone tell me why this happens and if there is a way to
get it to work when referencing the projects directly?
Thanks!
Zac Mouneimneh
Programmer/Developer
Lieberman's Gallery, LLP