Best way to add project references to another project ???

Posted on 2005-05-16
Last Modified: 2010-04-16

I would like to know what's the  best way to add references to a project.

Example :

I've two 2 projects ...

   * Data Connection Project
   * Customer Project

The customer project must have access to the functions of the data connection project. For this, I've to add to data connection references to the customer project. What is the best way to add such references? Do I've to add the complete existing project to my customer solution? Or am I better to add only the dll who is located into the bin folder of my data connection project? What are differences between the two? I also want to be able to debug easily.

Last question... If my data connection also has a reference to another project like a global class (sql functionalities) do I've to add the complete solution (*.sln) to my customer class or only the project (so that all the including projects are references as well) ???

Thanks a lot for your help !!!!

Question by:davyberroho
    LVL 96

    Accepted Solution

    If you add the reference from the solution level, then you have access to the code when running and you need to debug on the development machine.  When you build the solution and the project for the main executable, the compiler will create a DLL reference for you.


    Author Comment

    Thanks a lot for your fast answer !

    I've another question....
    Is it normal that, once I've add the existing solution to my project, I still have to add a project-reference? (My Project --> references tab --> add references --> projects and then I've to choose the added project.) otherwise it cannot find the referenced project ???

    Thanks a lot.

    LVL 96

    Expert Comment

    by:Bob Learned
    Yes, that is normal.  That is the nice part about project references.  It allows access to the code in the DLL project, and creates a reference binding when deploying it.


    Author Comment

    Thanks a lot Bob !!!

    You certainly earn the 500 points ! ;-)

    Thanks again!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    In one of my recent projects, I was working with IP cameras, I need to take some pictures from the camera and do some processing on it. The first step, was to retrieve the image from camera into Image object. So that it can be displayed or …
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now