Reference problem when using VB classes with C# classes 
Author Message
 Reference problem when using VB classes with C# classes

Hello,

You need to specify the Project Dependencies and Project Build Order for
your solusion. You may do this by right click a project in the solution
explorer and select Project Dependencies and Project Build Order.

Hope this helps.

Best regards,

Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.  2001 Microsoft Corporation. All rights
reserved.
--------------------
    Content-Class: urn:content-classes:message


    Subject: Reference problem when using VB classes with C# classes
    Date: Wed, 18 Dec 2002 08:55:27 -0800
    Lines: 767

    MIME-Version: 1.0
    Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_08CB_01C2A673.35BBDFB0"
    Content-Transfer-Encoding: 7bit
    X-Newsreader: Microsoft CDO for Windows 2000
    X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    Thread-Index: AcKmtkPfaRB03vdSRw6ECnzFaUiQ9w==
    Newsgroups: microsoft.public.dotnet.languages.csharp
    Path: cpmsftngxa06
    Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:117455
    NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
    X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

    Hello All,

    I am facing a reference problem when using C# projects
    along with VB.NET projects in the same solution. The VB.NET
    compiler complains of a missing assembly reference when a
    VB class inherits from a C# class which in turn inherits
    from another VB class and all classes are in different
    projects.

    In the attached sample, BaseClassVB project is a VB.NET
    project that defines the Base VB class. The C# project
    ClientCSharp contains ClientC class that inherits from the
    VB Base class. Finally, the third VB.NET project ClientVB
    contains the ClientVB class that inherits from the C#
    ClientC class.

    The compiler complains of a missing reference to the
    assembly containing the Base VB class though it is
    included in the project references. The problem goes
    away if I use DLL reference instead of Project References
    but that is an unacceptable solution. Howvwer, that using
    DLL references is not a solution as the compiler will not
    rebuild the project if the dependent DLL is modified. This
    seems to be a VB.NET compiler bug as I could not replicate
    it the other way (using C# as Base class).

    Any suggestions on workarounds (other than removing
    project references) are welcome.

    Thanks,
    AJ



Tue, 07 Jun 2005 15:29:15 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Using C# Class With A VB Windows Form?

2. using C# and VB.NET classes in the same project

3. Using VB.NET Class in C# without making as DLL

4. using VB runtime assembly classes in C#

5. Internal Compiler Error while deriving C# class from a MC++ class implementing a C# interface

6. Key/tab problems using VB ActiveX controls in MFC CView and derived classes or PropertyPage

7. using class in other classes problem

8. referencing COM objects with C# class

9. Problem referencing C# defined constant from VB.NET in ASPX page

10. Forward references to classes whose base classes must be known

11. How do I instantiate a class from a class reference

12. Can I add a C# class in VB.NET

 

 
Powered by phpBB® Forum Software