none
Running a old version of build script in TFS2010

    Question

  • Hi,

    I have some TFS2008/2005 projects. Now I want to test how the old build script works in TFS2010. Here is my plan:

    1. Get the lastest version of the source code and build script (2005 version).

    2. Check in both source code and build script to a TFS2010 project.

    3. Fix the source code to make sure it compiles in 2010.

    4. Create a build script with Upgrade Template in order to reuse the old version of build script.

    5. Run the build script.

    Will my plan work? Do I have to use migration tool? Is the migration tool easy to use? I don't care about losing history of the source code, all I want is put the code in the new box and reuse the old build script. If the plan works, where should I check in my old build script? It seems to me that there is no "Team Builds" folder in 2010.

    Thanks.

     

    Jason

    Monday, April 26, 2010 8:21 PM

Answers

  • Hi Jason, in TFS2005, a lot of information surrounding the build is located in the TFSBuild.proj and in other files that are checked into source control. In TFS 2008, several of those options, such as workspace mappings and drop location was moved to the database which made it possible to edit this information using the Edit Build Definition dialog in Team Explorer. In TFS 2010, even more information is moved to the TFS database, the only thing that is really still in source control is the build process template XAML.

    So, to answer your questions:

    1) The settings in the Build Definition will override anything that might exist in TFSBuild.proj

    2) That import is dependent on the TFS 2005 target files. You would have to copy them there manually I think, you cannot install TFS 2005 and TFS 2010 on the same build server

    3) Same as 1)

    4) Same thign here really, in TFS 2005 this information was located in the WorkspaceMappings.xml file. Now it is stored in the database and edited using the Edit Build Definition. So you need to migrate the mappings from that file into the build definition

    Hope that helps
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
    • Marked as answer by jason Luo Tuesday, April 27, 2010 3:21 PM
    Tuesday, April 27, 2010 3:13 PM

All replies

  • It should work.

    You can put your build script anywhere. In the upgrade template you can define which folder contains the build script.


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

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Tuesday, April 27, 2010 4:08 AM
  • Hi Ewald,

    I tested my plan. There is a lot of work to modifiy the script.

    1. It is like migrating the build script to another build box, you have to change <TeamProject>, <BuildDirectoryPath>

    <

     

    BuildMachine>, <DropLocation> ... and so on. And I don't have a clear idea whether those property/itemgroup will ever get used in 2010.

    2. The following line is not working in 2010.

    <

     

    Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets" />, so I have to manually copy the target file, and not sure whether I have to copy dlls as well.

    3. There is a confusion on DropLocation/Dropfolder. I already defined droplocation in a old build script , now TFS2010 build defination asks me for a drop folder. Which one is going to overide another?

    4. Confusion on workspaces, one in my old build script, another one is in 2010 build defination.

    After spending half an hour, I have not gotten the build working yet. So I feel probably i am better off just recreate a new build defination. Any opinion is welcome.

    Can anyone who did this kind of experiments share your experience? Thanks.

    Jason Luo

    Tuesday, April 27, 2010 2:57 PM
  • Hi Jason, in TFS2005, a lot of information surrounding the build is located in the TFSBuild.proj and in other files that are checked into source control. In TFS 2008, several of those options, such as workspace mappings and drop location was moved to the database which made it possible to edit this information using the Edit Build Definition dialog in Team Explorer. In TFS 2010, even more information is moved to the TFS database, the only thing that is really still in source control is the build process template XAML.

    So, to answer your questions:

    1) The settings in the Build Definition will override anything that might exist in TFSBuild.proj

    2) That import is dependent on the TFS 2005 target files. You would have to copy them there manually I think, you cannot install TFS 2005 and TFS 2010 on the same build server

    3) Same as 1)

    4) Same thign here really, in TFS 2005 this information was located in the WorkspaceMappings.xml file. Now it is stored in the database and edited using the Edit Build Definition. So you need to migrate the mappings from that file into the build definition

    Hope that helps
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
    • Marked as answer by jason Luo Tuesday, April 27, 2010 3:21 PM
    Tuesday, April 27, 2010 3:13 PM
  • Hi Jakob,

    Thanks a lot for clarifying those questions. If you have around 100 2005 build scripts and a few 2008 build scripts, will you use the upgrade template? I just feel I might spend more time upgrading them than creating brand new ones. And the downside of upgrading them is that I am stuck with the old way.

    Or, maybe I should ask you the other way. When should people pick upgrade path? and when should people go ahead with brand new build script?

    Thanks.

     

    Jason

    Tuesday, April 27, 2010 3:21 PM