469,631 Members | 1,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Assembly Reference Problems

I'm having a major problem with assembly references that I keep running
into, and I'm really hoping that someone can help me out. The problem
occurs when I have three projects in my solution, two of which I have
developed in VB.NET and one in C#. When I use Project A (VB) inside Project
B (C#), and then from Project C (VB) reference methods of Project B that
uses classes from Project A, I get an error that indicates I need to include
a reference to the original project. However, I've already included a
reference, and in fact can use the same exact type that I'm trying to use
that's generating an error on the function call anywhere else in the

I have a more detailed write up of the problem, with some example code that
reproduces the problem in very few lines on my website at
http://ryangregg.com/archive/2004/01/21/188.aspx. If someone out there
could take the time to look at this and see if they can give me a solution,
I would very much appreciate it.

Thanks in advance.

Ryan Gregg
Jul 21 '05 #1
2 1188
I posted the following on your web site at
This seems to be a known bug in VS.NET with cross-referencing VB and C#
assemblies, please refer to the following google links for symilar posts.
(the URLs are quite long and may wrap around)

[URL #1]
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=QZdkywmJDHA.2284%40cpmsftngxa06.phx.gbl& rnum=10&prev=/groups%3Fsourceid%3Dnavclient%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassembly%2Breference>&lr=&ie=UTF-8&oe=UTF-8&threadm=QZdkywmJDHA.2284%40cpmsftngxa06.phx.gbl& rnum=10&prev=/groups%3Fsourceid%3Dnavclient%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassembly%2Breference

[End of URL #1]

[URL #2]
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=eWmg4OEkCHA.2736%40tkmsftngp10&rnum=7&pr ev=/groups%3Fsourceid%3Dnavclient%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassembly%2Breference>&lr=&ie=UTF-8&oe=UTF-8&threadm=eWmg4OEkCHA.2736%40tkmsftngp10&rnum=7&pr ev=/groups%3Fsourceid%3Dnavclient%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassembly%2Breference

[End of URL #2]

Looks like the only way out of this is either to rewrite the code using the
same language, or to reference the binary assemblies instead of projects.

My company is the author of a build automation and management tool called
VisualMake (http://www.visualmake.com), which, among other things, will
resolve the project references to their respective binaries during build
time. I just built your sample solution using VisualMake - no problem at
all. If you want to try it, a fully functional trial is available from the
web site.

Jul 21 '05 #2

I have the same error "Reference required to assembly" with
cross-referencing VB and C# assemblies.
I tried to follow the suggestions in provided by Gagik Google links to
replace project-to-project references to file references.
Now I have errors like
Value of type 'Namespace.ClassName' cannot be converted to
'Namespace.ClassName'.(Note that both 'Namespace.ClassName' are the
It seems that compiler tries to match different versions of the same
DLL. I've tried to change "Local Copy" to false and back but still have
Does anyone can suggest other workarounds within Visual Studio.Net
without rewriting all projects to one language?

Michael Freidgeim
Add ".com.au" to my e-mail address to reach me by e-mail

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Simon Wallis | last post: by
3 posts views Thread by Bruce D | last post: by
10 posts views Thread by jojobar | last post: by
11 posts views Thread by Just Me | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.