locked
TFS and third-party assembly references - Best Practice RRS feed

  • Question

  • Hi All,

    One of our team projects uses 3rd party assemblies. We add those assemblies as references in our project. The problem is I copied the 3rd-party assembly to a particular location in my computer and added reference to that whereas my team member might not copy the assembly in the same location and path can be different. So, when either of us gets the latest version of solution, we are being forced to override each others' references by removing and adding them. THis does not sound like a good solution and I am sure we are doing something blatantly wrong. What is the best practice here?

    Also, if we have assembly references to other team projects, what is the right way to add references to them understanding that my team mates may not map them to the same location.

    Thanks for any pointers!

    Wednesday, August 3, 2011 7:39 PM

All replies

  • my question did not make sense?
    Wednesday, August 3, 2011 8:42 PM
  • Hi diffident,

    I would recommend that you shape your branch structure in TFS as such that create a refs folder to keep all external dll's in the version control.

    1. Easy to share with team members, do not have to follow a convention to copy them to a specific directory to your computer

    2. Easy to set up for the build process, since the binaries and external dll's will be available with in the source control on the server

    3. Future upgrades for the external dll's will be very easy to manage since you will only have to update them in TFS to ensure your team members get the latest to get the latest version of the upgraded dll.

     

    In case i have understood your question in correctly or you have follow up questions, feel free to add to the thread.

    HTH
    Cheers, Tarun


    Please remember to mark the replies as answers if they help.

    Tarun Arora

    Blog: http://geekswithblogs.net/TarunArora  Subscribe in a reader

    Wednesday, August 3, 2011 10:09 PM
  • Tarun - Thanks a lot for your reply. That makes sense.

    How about other TFS projects I have added as a reference? Should team members have to map them to the same path on individual local machines? If I update that team project and check it in, will it (reference) get updated in the individual team member machines if they get latest version? What is the best practice?

     


    Wednesday, August 3, 2011 10:35 PM
  • Also should that "refs" be added as a folder to the project or can I just add it as a folder to TFS and it will be available to team members? I do not like the idea of creating folders in my visual studio projects.
    Wednesday, August 3, 2011 10:44 PM
  • In adition to Tarun's answer I can mention other common name for the refs folder is some combination of Shared/External Binaries/Libraries.

    You dont have to make a folder in your solution/project for the Shared Binaries folder.

    Wednesday, August 3, 2011 11:33 PM
  • Mattias -

    How about other TFS projects I have added as a reference? Should team members map them to the same path on individual local machines? If I update that team project and check it in, will it (reference) get updated in the individual team member machines if they get latest version? What is the best practice?

    Let's say Project A needs reference to another Project B. So, at that point what is the best practice of adding reference to Project B? First add project B to the solution as an existing project and then go to Project A and add reference to project B? Is that right way? So all my team members should map project B to the same structure as I did in my local machine?

    Thursday, August 4, 2011 4:08 PM
  • Hello different,

    Thanks for your post.

    If you have two team projects, called TeamProjectA and TeamProjectB, both of them reference one third-party assembly we call it SharedAssembly.dll. In this scenario, one common way is that you should create a shared Team Project which is open for all your team members. And then you put these 3-party assemblies to one folder of that team project.

    And this time you should get the entire Team Project Collection to your local machine to ensure that the folder structure on your local machine is exactly the same as that on the TFS server machine. And yes, the structure on all your team members’ local machines should be the same.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, August 5, 2011 8:32 AM
    Moderator
  • Thanks for your reply Vicky but that was not my question. I meant what if TeamProjectA references another TeamProjectB i.e., TeamProjectA has a dll reference to TeamProjectB. What is the best practice?
    Monday, August 8, 2011 3:51 PM