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

Posted on 2005-05-16
Medium Priority
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
  • 2
  • 2
LVL 96

Accepted Solution

Bob Learned earned 2000 total points
ID: 14012175
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

ID: 14012313
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
ID: 14012337
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

ID: 14012398
Thanks a lot Bob !!!

You certainly earn the 500 points ! ;-)

Thanks again!

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses

839 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