Project Reference not working

Discussion in 'ASP .Net' started by Hitesh Khatri, Jul 7, 2003.

  1. Hi All,
    I have web application project, to which I have added
    project-reference to another class library.

    When I am using one of the property from that class. I am
    getting following error.

    'Public Overridable Overloads Property PropName() As
    Project1.PropName' is declared in project 'Project1.dll',
    which is not referenced by project 'WebProject.dll'.

    I don't want to add direct reference to the dll file, I
    want to use project reference. I also tried using Import
    statement in my module but It didn't help too.

    Please suggest a solution.

    Regards,
    Hitesh
     
    Hitesh Khatri, Jul 7, 2003
    #1
    1. Advertising

  2. Hitesh Khatri

    Natty Gur Guest

    Hi,

    If 'Project1.dll' is the class library assembly you must make reference
    to it, otherwise .Net don’t know which assembly lo load.

    If 'Project1.dll' isn’t the class library but it assembly that the class
    library used then check if the property that you call return ant type
    declare in the 'Project1.dll' assembly. If so you also must make
    reference to it.

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Jul 7, 2003
    #2
    1. Advertising

  3. Hi,
    Thanks for responding to my question.

    I am having one Web Project (VB.NET-WebProject.dll) and
    one Class Library Project (VB.NET-Project1.dll) in my
    Solution. In the Web Project, I have added 'Project
    Reference' to the Class Library Project. The reference
    property is also showing the correct path for the dll
    (based on build config). Why .NET cannot load assembly
    from that path.

    You are suggesting that I must add direct reference to
    Project1.dll and not 'Project Reference'. What is the use
    of project reference?

    I have different build config (Debug, Release etc.) setup
    for my project. In case I add direct reference to the
    dll, do I have to keep changing it when I switch the
    build config? or should I just add reference to the dll in
    the bin folder?

    Thanks in advance for your help.
    Regard,
    Hitesh
     
    Hitesh Khatri, Jul 7, 2003
    #3
  4. Hitesh Khatri

    Natty Gur Guest

    Hi,

    >You are suggesting that I must add direct reference to Project1.dll and
    >not
    >'Project Reference'. What is the use of project reference?


    No, What I meant is project reference. Any way if you reference the DLL
    but ASP.NET not seems to load it check if the Copy Local property of the
    reference set to true. If not set it to true. This will end up with a
    copy version of the DLL in the Bin directory of your web application.

    .Net looks for reference assembly in GAC and if the assembly not found
    in the GAC in the Bin directory of the loading application. If the
    assembly not found in those locations the CLR raise error.


    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Jul 7, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darren
    Replies:
    0
    Views:
    510
    Darren
    Oct 11, 2004
  2. Claude seraphin
    Replies:
    12
    Views:
    2,433
    samundersingh1983
    Feb 15, 2014
  3. Ken Stealth
    Replies:
    2
    Views:
    4,335
    =?Utf-8?B?amRneChDb2xvbWJpYSk=?=
    Jan 31, 2004
  4. Simon Kennedy
    Replies:
    0
    Views:
    7,221
    Simon Kennedy
    Jan 4, 2006
  5. Eskimo
    Replies:
    7
    Views:
    218
    william
    Mar 3, 2008
Loading...

Share This Page