Answered TFS Project file for deployment of components already built.

  • Wednesday, February 22, 2012 8:13 PM
     
     

    I have a number of independent components that make up multiple applications. Some components are shared, some are exclusive, many have their own Automated Build definition in TFS.

    My requirement is to be able to create a TFS Project file that will do the following:

    1. Given a list of TFS Projects and Build Numbers, retrieve the ALREADY Dropped files created in a previous build of that component and copy to a specified location.
    2. Using the copied files, create deployment packages with several tools (I already know how this works)

    The important aspect here is that I do not want to get any source files, I do not want to build any solutions, I don't want to do ANY of the predetermined events that a traditional TFS Build Project would do.

    What target(s) would be the best to override? Do I need to override some targets to do nothing?

All Replies

  • Thursday, February 23, 2012 8:09 AM
    Moderator
     
     


    Hi Dean,

    Thanks for your post.

    Your TFS Server is 2008?

    I think you can custom “After Compile” target in all your TFSBuild.proj to copy the files(dlls) to the specified location, after each build, the files(dlls) will be copied to that specified location, then in your step 2, you can use that copied files.  

    MSBuild has a “Copy” task used to copy files, please refer to: http://msdn.microsoft.com/en-us/library/3e54c37h(VS.90).aspx
    and this article:
    http://toadcode.blogspot.com/2008/06/copy-multiple-files-via-tfs-build.html?z#!/2008/06/copy-multiple-files-via-tfs-build.html.
     



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

  • Thursday, February 23, 2012 4:44 PM
     
     

    Thanks for the suggestion. But I don't see an answer for what I really want.

    I need to prevent ALL the tasks prior to "AfterCompile" from running. I don't want to actually build anything. All the components I require to operate on have been previously built by other Build Projects. It could be one project, or dozens.

    The intent is to gather the output from other Build Projects and perform packaging and deployment ONLY.

    Dean

  • Friday, February 24, 2012 8:04 AM
    Moderator
     
     Answered


    Hi Dean, 

    Thanks for your reply.

    You can do that customization in your previous Build Definitions, for example use the “Copy” task to copy required files(dlls) to c:\Deploy folder, to queue your previous build definitions, all
    the required files(dlls) will be copied to c:\Deploy folder, then when you want create the deployment packages, copy the dlls from c:\Deploy.

    If you don’t want to queue the previous build definitions to copy require files to the specific location, I think you should copy the files from build drop location using TFS API when you
    want to create deployment packages.   



     



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