Project Reference not working

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Project Reference not working

    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 Guest

  2. Similar Questions and Discussions

    1. Add Project Reference Dialog...
      I've designed a web control in VS as an ASP C# control. I've created a new project and want to add a project reference from it to the C# control's...
    2. why does my webservice web reference not work in aspx project?!
      Hi, I have a webservice on my local development box. I add a web reference in a web application to it. My reference usually comes up as...
    3. How to reference Word/Excel without using Visual Studio project
      To create Excel file, you can Add Reference Visual Studio.NET, browse to ... and then select Microsoft.Office.Interop.Excel, etc. It endsup some...
    4. Can I add web reference to my VB.NET project at run time?
      My project will be delivered to different sites therefore they will be referenced to the web services at their own web server. I don't want to...
    5. Working on an opensource project
      Hey everyone, I'm starting a project for my current site http://metalempire.com called Empires; it's going to be a online RPG unlike all others...
  3. #2

    Default Re: Project Reference not working

    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  4. #3

    Default Re: Project Reference not working

    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 Guest

  5. #4

    Default Re: Project Reference not working

    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139