Assembly Reference Problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ryan Gregg

    #1

    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
    function.

    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


  • Gagik A

    #2
    Re: Assembly Reference Problems

    Ryan,
    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.c om/groups?hl=en&lr =&ie=UTF-8&oe=UTF-8&threadm=QZdky wmJDHA.2284%40c pmsftngxa06.phx .gbl&rnum=10&pr ev=/groups%3Fsource id%3Dnavclient% 26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassem bly%2Breference >&lr=&ie=UTF-8&oe=UTF-8&threadm=QZdky wmJDHA.2284%40c pmsftngxa06.phx .gbl&rnum=10&pr ev=/groups%3Fsource id%3Dnavclient% 26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassem bly%2Breference

    [End of URL #1]

    [URL #2]
    http://groups.google.c om/groups?hl=en&lr =&ie=UTF-8&oe=UTF-8&threadm=eWmg4 OEkCHA.2736%40t kmsftngp10&rnum =7&prev=/groups%3Fsource id%3Dnavclient% 26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassem bly%2Breference >&lr=&ie=UTF-8&oe=UTF-8&threadm=eWmg4 OEkCHA.2736%40t kmsftngp10&rnum =7&prev=/groups%3Fsource id%3Dnavclient% 26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dproject-to-project%2Bassem bly%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.

    Regards

    Comment

    • Michael Freidgeim

      #3
      Re: Assembly Reference Problems


      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.Clas sName' cannot be converted to
      'Namespace.Clas sName'.(Note that both 'Namespace.Clas sName' are the
      same).
      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
      errors.
      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!

      Comment

      Working...