locked
Sharing a library between different project RRS feed

  • Question

  • Dear all,

    I try to find a good organisation on my developpement project under TFS 2010.

    It is quite clear when I am handling different standalone project but then comes the problem when I have a Porject name InternalLibraries in my TFS which is a project where I centralise all what can be common in order to be share. This InternalLibraries project has a Source and Binaries folder under DEV root.
    When this project is compiled all bin files goes to Binaries.

    Then now some other project internal to TFS need a reference to this InternalLibraries binaries in order to use common part of it.

    Question is how can I share those bin to be refer by other project ?

    Do I have to point directly to InternaLibraries\Binaries folder or do I have to create for that project under TFS a specific Share folder where I place build binaries ?

    thnaks for help

    regards

    serge


    Your knowledge is enhanced by that of others.

    Wednesday, March 21, 2012 4:43 PM

Answers

All replies

  • Hi Serge, 

    Thanks for your post.

    In this scenario, I suggest you create a specific Share folder under the Team Project to place that binaries.  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 22, 2012 2:54 AM
    Moderator
  • So then it I create a share folder which will contains all my share binaries it means that each of my TSF project should push the release lib to that share folder somehow right ?

    or do I have to create a kind of Merge stuff


    Your knowledge is enhanced by that of others.

    Thursday, March 22, 2012 8:08 AM
  • Hi Serge,

    Thanks for your reply.

    I think you can create a share folder which contains all your share binaries. Like the following structure:

            Team Project

                        Assemblies(share folder)

                        Project1

                        Project2


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 22, 2012 8:45 AM
    Moderator
  • Yes but what if the Assemblies (Share Folder) that you define above in Team Project name need to be shqred between all team project in TFS ?


    Your knowledge is enhanced by that of others.

    Thursday, March 22, 2012 1:07 PM
  • Hi Serge, 

    Thanks for your reply.

    If you want to share between all the Team Project, I suggest you create a special Team Project which use to only created that share folder under it. Like the following structure:

                  Team Project

                             Assemblies(share for all team project)

                   Team project 1

                             … …

                   Team Project 2

                             … …


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Friday, March 23, 2012 6:00 AM
    Moderator
  • hello,

    one last question before it is clear enought.

    Can I go with the following structure :

                         SHARE Team Project

                             Binaries (Share binaries of project 1 and 2)

                            project 1

                                 Source 

                           Project 2

                                 Source

                   Team project 3

                             … …

                   Team Project 4

                             … …

    Then, from a porject WorkSpace, how can I refer to my share Binarie folder in order that the binaries gets included in it ?

    reagrds

    serge


    Your knowledge is enhanced by that of others.


    Thursday, March 29, 2012 10:08 AM
  • Hi Serge, 

    Thanks for your reply.

    Yes, you can.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Friday, March 30, 2012 2:04 AM
    Moderator
  • Then what about the question:

    Then, from a porject WorkSpace, how can I refer to my share Binarie folder in order that the binaries gets included in it ?


    Your knowledge is enhanced by that of others.

    Monday, April 2, 2012 8:32 AM
  • Hi Serge, 

    Thanks for your reply.

    Your project 1 and project 2 can reference that binaries from that Binaries folder directly, Reference>>Add Reference>>Browse, to select the Binaries folder. In this case, when you create Build Definition to build your project, in Build Definition>>Workspace tab, should map the Binaries folder from Source Control Folder to Build Agent Folder.    


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, April 2, 2012 8:43 AM
    Moderator
  • The project that would need to reference my share binaries are not Project  or 2 but those below team Project 2 and 3 instead

    so how to do? do I need to add the path to Share binaries in TFS workspace  or simpley reference from each application which need it ?


    Your knowledge is enhanced by that of others.

    Monday, April 2, 2012 9:50 AM
  • Hi Serge, 

    Thanks for your reply.

    Could you provide a detailed example to describe your scenario? 

    The ‘project’ is mean what? And the ‘Project’  mean is what? How that ‘project’ use your binaries in it? Sorry for that I’m not very clear with your scenario.

     What’s the “add the path to Share binaries in TFS workspace” mean?  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, April 2, 2012 10:12 AM
    Moderator
  • Ok the idea is as follow :

    I have a Shared TFS Team project where inside I have different type of common sared library project like :
      project 1 : set of classes to build Common1.dll
      project 2 : set of classes to build Controls.dll

    When compiles, thos project output will go to a Binaries folder inside Shared TFS Team Project

    Then I have one TFS Team project per application like :

    Team projet Application 1 , Team Project Application 2,.. which have the same structure as follow under TFS :

       - Source

      - Binaries

    Team projet Application 1 and Team projet Application 2 need to used binaries of share libraries created from Shared TFS Team project , but should not be affected by sucessif going one build which is not realsed for production.

    How does those Shared TFS Team project need to be handle and referenced on other Team project ?

    regards

    serge


    Your knowledge is enhanced by that of others.

    Monday, April 2, 2012 11:40 AM
  • Hi Serge, 

    Thanks for your reply.

    “When compiles, those project output will go to Binaries folder”. Yes, after complied, the output will go to the Binaries folder, but as far as I know, the Binaries folder not in TFS Source Control by default. If you want to share that Binaries folder in TFS Source Control, you should check in this Binaries folder to TFS Source Control first. In your scenario, you should check in it under Shared TFS Team Project.

    After you check in the Binaries folder into TFS Source Control(under Shared TFS Team Project), then your Application 1 and 2 can reference dlls from that Binaries folder which under Shared TFS Team Project.

    I suggest you to test this scenario in your TFS 2010.   

           


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, April 3, 2012 6:24 AM
    Moderator
  • I was thinking that reference can be added with the WorkSpace project Settings as we can add different folder path there.

    what is the real use of those WorkSpace settings ?

    in which scenario will I have to get different folder entries in it ?

    regards

    serge


    Your knowledge is enhanced by that of others.

    Tuesday, April 3, 2012 3:33 PM
  • Hi Serge, 

    Thanks for your reply.

    What’s the “Workspace setting” mean? Edit workspace?

    For detailed information about Workspace, please refer to this article: http://visualstudiomagazine.com/articles/2011/07/26/wctfs_tfs-version-control.aspxand this document: http://msdn.microsoft.com/en-us/library/ms181383.aspx.     


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, April 4, 2012 5:57 AM
    Moderator