none
TFS 2010 Team Build: How to build both unmananged and managed solutions in a same team build definition

    Question

  • Hello,

     

    I have 2 solutions: one contains all C# projects, and the other contains all C++/interop C++ projects.  The managed solutions uses Mixed Platforms/Any CPU and the unmanaged solution uses win32/x64 platform.

     

    Questions:

     

    1. Is there any way to combine both of these solutions into 2010 team build and still be able to build their own respective platform/configuration?  As of right now, whatever we pick in "Platform and Configurations" will be used to compile all solutions.  This will fail the solutions since win32 won't be in managed solution and any cpu won't be in unmanaged solution, e.t.c.

    2.  Since the unmanaged solution depends on managed solution, if we have to split the team build into 2 builds: one to build managed and the other to build unmanaged projects.  Any way to link both team builds together?

    Thanks!


    Cuong Hoang
    Monday, May 10, 2010 7:50 PM

Answers

All replies

  • Hi Cuong,

    The default build process template doesn't support to build multiple projects with different platform/configurations, but you can customize the template and create you own activities.

    One way that I can think of is to write a custom activity to trigger another build after current build finishes. In this case, it should be the C# projects build to trigger the native projects build.

    The following link explains how to write a custom activity in TFS 2010: http://blogs.msdn.com/jimlamb/archive/2009/11/18/How-to-Create-a-Custom-Workflow-Activity-for-TFS-Build-2010.aspx

    In order to trigger a TFS build in API, please refer to: http://www.woodwardweb.com/dotnet/tfs_build_api_b.html

    Hope it helps.


    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.
    See what's happening in MSDN forum? Follow us at Twitter.
    Tuesday, May 11, 2010 7:40 AM
    Moderator
  • Hongye,

     

    Thanks for the reply.  The solutions and the team builds are actually still in 2008 format.  I think i can manipulate the 2008 team build definition to build projects using different platform/configurations.  I just thought there was a way to achieve this easier using 2010 team build definitions.

     

    Cuong.


    Cuong Hoang
    Tuesday, May 11, 2010 8:37 PM
  • Hi Cuong,

    Thanks for your reply.

    You may misunderstand my meaning. The first link I provided is a solution for TFS 2010.

    For the second link, sorry that it is for TFS 2008, since I didn't find any good example for TFS 2010.

    Here some article about how to manipulate build service in TFS 2010 programmatically. Hope it helps:

    http://geekswithblogs.net/jakob/archive/2009/12/08/tfs-2010-ndash-managing-build-agents-using-the-api.aspx

    http://geekswithblogs.net/jakob/archive/2010/04/26/creating-a-build-definition-using-the-tfs-2010-api.aspx

    Thanks


    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.
    See what's happening in MSDN forum? Follow us at Twitter.
    Wednesday, May 12, 2010 8:19 AM
    Moderator
  • I'm also setting up TFS 2010 build with multiple unmanaged and managed build solutions. Our C++ projects are targeted to Win32 platform and C# projects to Any CPU. They are also dependent on each other, and there are even C++ and C# projects included in same solutions. So all projects need to be compiled in same build.

    As mentioned including both build configurations (Release/Win32 & Release/Any CPU) in TFS build does not work because it will compile both configurations for all solutions. I ended up to create a new build configuration (Release/Mixed Platforms) for each solution and set each projects target platform to correct value (Win32 for C++ and Any CPU for C#). Now Release/Mixed Platforms is the only configuration included in TFS build and everything compiles.

    • Proposed as answer by TommiR Thursday, December 09, 2010 7:20 AM
    Thursday, December 09, 2010 7:10 AM
  • I built something on codeplex called BRDLiteOrchestrator which allows you to orchestrate a combination of builds.  You might consider this.  Of course, this version is the older 2012 version I built.  It doesn't look like the 2010 version is published, but you can probably reverse-engineer it if you play around.

    http://vsarbrdlite.codeplex.com/downloads/get/612423

    Thursday, August 22, 2013 7:25 PM