Ask a questionAsk a question
 

AnswerSetting up Team Procjects with Shared Source

  • Monday, October 26, 2009 6:06 PMUndying Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I have multipe Web Sites using the same Class Library (dll).

    WebSite1 use Class Lib1 and WebSite2 use also ClassLib1.

    What are my options?

    a) setup one Team Project include both WebSites?
    b) setup one Team  Project for the dll (SharedLib), one for WebSite1 and another one for WebSite2. (is this a practicable szenario? how could I do this? One Solution include Projects from 2 TeamProjects?)

    Thanks!

Answers

  • Monday, October 26, 2009 9:36 PMAlin Dumitrescu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    First option will be the easiest and it will work if you have a common release cycle for both web sites - just add all 3 projects (2 web, one class library) to the same solution in the same directory, so both web sites reference the same library.

    If different teams work on each component, (e.g. SharedLib team, Web Site 1 team and Web Site 2 team) with different release schedules, you may want to set-up a code branch for each of the 3 component. If that's the case, I would then branch the SharedLib code in each of the other projects. You will have to set-up an integration/release process for the shared lib and manage the code integration between branches very close - this is a complex implementation feasible for large teams. 

    If you post more details about your specific situation, we can see what's the optimal solution.

    Thanks,
    Alin,
    PRAKTIK Consulting
    TFS Hosting and TFS Consulting Services.

All Replies

  • Monday, October 26, 2009 9:36 PMAlin Dumitrescu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    First option will be the easiest and it will work if you have a common release cycle for both web sites - just add all 3 projects (2 web, one class library) to the same solution in the same directory, so both web sites reference the same library.

    If different teams work on each component, (e.g. SharedLib team, Web Site 1 team and Web Site 2 team) with different release schedules, you may want to set-up a code branch for each of the 3 component. If that's the case, I would then branch the SharedLib code in each of the other projects. You will have to set-up an integration/release process for the shared lib and manage the code integration between branches very close - this is a complex implementation feasible for large teams. 

    If you post more details about your specific situation, we can see what's the optimal solution.

    Thanks,
    Alin,
    PRAKTIK Consulting
    TFS Hosting and TFS Consulting Services.
  • Monday, October 26, 2009 10:20 PMUndying Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    thanks for your reply.

    We have multiple Web Sites (~ 10) and these get very frequently edited. These Web Site have a development time from 2 weeks and have a livetime from ~ 4-12 months and get many updates (edit some text, change a picture and so one) from the marketing guys. (Continuous Integration)

    These Web Sites use the same logic to access datebase. This dll also get few updates a week to fit customers needs. 

    What I want to achieve is a easy way to get this stuff in sync (today: person one change some stuff, person two overwrite it and so one ...)
    - Edit some stuff, Preview it on the local box, Check-In and Publish to "Production Server"

    Thanks
  • Wednesday, November 04, 2009 2:18 PMHongye SunMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I agree with Alin. First option will be much easier for your senario.

    If you are seeking for a best practice, please refer to: http://www.codeplex.com/TFSGuide. It gives a good instructions on how to organize the solution and projects in the source control.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Wednesday, November 04, 2009 9:53 PMWXS123 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'd recommend the first option as well if that works for you.

    We use another option:
    $/Project1,
    $/Project2
    $/Common for common projects shared.  This can get complicated though and somethings like team build don't like code that spans projects.

    I wouldn't recommend this way if you can choose the other options.