locked
Refering Class library from other project RRS feed

  • Question

  • Hi,
      I developed a project named Project1 which has 15 class library and it was in Team foundation server 2005.I am going to develop a new project named project2 and it has to refer the 10 class library from the project1. How to refer the class library from other project.Can any one suggest the best approach to do it. What is the best practice to refer the class library from other project because each user may have differnt folder structure while downloading the project to there workspace. 
     
     
    • Moved by Esther FanMicrosoft employee Wednesday, February 11, 2009 4:46 PM (Moved from Visual Studio Team System - Architecture & Design to Team Foundation Server - General)
    Wednesday, February 11, 2009 5:05 AM

Answers

All replies

  • There are two possibilities:

    1) Create two solutions, where you add all the class libraries that are required. You have then a flat list of projects in source control.

    2) Or you might add the dll's build from the first solution as binary references (instead of project references) to the second solution. The binary referferences are located in Source Control. You can use Team Build to update the binary references in Source Control

    Just as always, it depends....
    Ewald - Please remember to mark the replies as answers if they help.
    Thursday, February 12, 2009 12:15 PM
  • Hi,
      Thanks for the reply. 
      we have the two solution in two different team project and we donot want to use binary references.
      Problem we are facing is when one user referencing the class library from other soultion,it takes the local path how that user is loaded the both solution.If other user loaded the two solution is different folder structure it doesnot take the references add by other user. How to references the class library from the other solution in different team project. 
    Friday, February 13, 2009 4:23 AM
  • Hi !

    I did a blog post based on my answer to a  similar post some time ago.  That thread is at http://social.msdn.microsoft.com/forums/en-US/tfsbuild/thread/5a017a4b-4617-4339-af18-3077c77abb20/
    My blog post is at http://geekswithblogs.net/terje/archive/2008/11/02/article-on-subsystem-branching.aspx

    Take a look and see if this helps in your decision.  As Ewald writes above about what solution you go for - "It all depends".

    The problem you mention in your posts about mixups of workspaces is a common problem, and if you're going for a workspace-based solution you must keep the relative paths in those workspaces identical, and also identical to the workspace settings for the team build. 

    - terje

    • Proposed as answer by Bill.Wang Monday, February 16, 2009 1:41 AM
    • Marked as answer by Bill.Wang Tuesday, February 17, 2009 7:43 AM
    Saturday, February 14, 2009 2:51 PM