referencing dll of one project to another.

Last post 08-13-2008 3:04 PM by nb123. 4 replies.

Sort Posts:

  • referencing dll of one project to another.

    08-12-2008, 2:30 AM
    • Member
      280 point Member
    • nb123
    • Member since 07-04-2006, 11:31 AM
    • Posts 651

    hi,i have 2 projects in my solution file.One of the project is bascially to keep all my userControls,say UCLibraryProj in the namespace userControlLibrary and another is mainProject which will consume the userControls.i have built the all the projects successfully

    Now in my main project i have done add reference to "UCLibraryProj" . Also mainProject/bin contains the dll of UCLibraryProj.I am trying to use this usercontrol in page1.aspx . i have added "using userControlLibrary" to include the namespace for the userControl.I get the intellisense for the class inside  UserControlLibrary namespace.However when i try to run it it gives me the error saying 'src' not specified?

    page1.aspx(inside mainProject)

    %@ Register Assembly="UCLibrary" Namespace="UserControlLibrary" TagPrefix="UCL" TagName="reqForm" %>

    What do i give in source attribute here,since i am referecing the assembly here? Also IS IT NECESSARY to have this UCLibrary registered inside global.asax or something ?

  • Re: referencing dll of one project to another.

    08-12-2008, 3:34 AM
    • Participant
      1,045 point Participant
    • ruckfules
    • Member since 03-13-2008, 11:07 AM
    • Sri Lanka
    • Posts 158

    Set the build path of the user control library to main project. and make the build order. User Control library project 1st and then the main project.  

    when u r running the project check once the latest build dll of user control library is in bin folder of main project. 

    no need to set parameters of global.asax file.  

    dakshitha
  • Re: referencing dll of one project to another.

    08-12-2008, 1:57 PM
    • Member
      280 point Member
    • nb123
    • Member since 07-04-2006, 11:31 AM
    • Posts 651

    Can you please explain how do you do this "Set the build path of the user control library to main project" .

  • Re: referencing dll of one project to another.

    08-13-2008, 3:23 AM
    • Participant
      1,045 point Participant
    • ruckfules
    • Member since 03-13-2008, 11:07 AM
    • Sri Lanka
    • Posts 158

    Hi,

    1. Right-click ' user control library' project in solution explorer.

    2. go to properties

    3. go to build tab

    4. under output - set output path to bin folder of the main project.  

    dakshitha
  • Re: referencing dll of one project to another.

    08-13-2008, 3:04 PM
    • Member
      280 point Member
    • nb123
    • Member since 07-04-2006, 11:31 AM
    • Posts 651

    thanks...will do that..

Page 1 of 1 (5 items)