HeyJP

We are trying to replace CruiseControl with Team System. We have a number of custom perl scripts that we use to get several things done, and we need to figure out if these things can be done simpler in Team System.

The first thing is to increment the build number. We have a perl script that does that, is there a way to do that in Team System/Visual Studio (C#)

Secondly, we need a way to pack all of the prerequisites. In Team System we created an installer and clicked on Prerequisites and then entered a network path in the "Download prerequisites from the following location:" area, but when we built it, it still seemed to go to the local folder to get the prerequisites.

The last thing I imagine will probably be the trickiest. We have a script to packages the build into a zip file and copies it onto our network.

I'm sure there's a way to do most of this in Team System somehow...


Re: Team Foundation Server - Build Automation Some things I need to do in Team System...

Paul Hacker

i suggest that you look at the SDC Build Tasks. They can most likely accomplish your needs. This is a group of Build Tasks that you can use in the TFSBuild.proj file to do all sorts of cool stuff with the Build.

There is the latest and greates t here http://www.codeplex.com/sdctasks

and some older versions here http://www.gotdotnet.com/codegallery/codegallery.aspx id=b4d6499f-0020-4771-a305-c156498db75e

I have used the older versions to stamp assemblies and create zip packages so I know they work well.

You may be able to just pull the prereqs to the build server as part of you Get operation. They are in TFS source correct

-paul






Re: Team Foundation Server - Build Automation Some things I need to do in Team System...

HeyJP

The prereqs are just a folder on the network somewhere that we need to get whenever we build. By default I guess it gets them from the Visual Studio folder on the local disk. I've even tried renaming one of the folders on the local disk in hopes that it would acknowledge that I want it to go look somewhere else for the prereqs but it didn't change anything.

I also went to that site and downloaded the zip folder which had some dlls in it. I wasn't sure what to do with them or how to incorporate them into the TFSBuild.proj file




Re: Team Foundation Server - Build Automation Some things I need to do in Team System...

Paul Hacker

ok thats the newer version. You just need to put the DLL's on the build server somewhere and then add an import statement into the TFSbuild.proj file . There should be a .chm help file that you can reference. The TFSBuild Script already has one <Import/> statement the references the TeamFoundation.Build.Targets file use that as a reference if need be, but you are just using a path to the dlls thats all.

As for the PreRequisites, are those files that the project your are going to build need to have as a refernece or are you just wanting to package them into the file zip package.

If all you are doing is going to package them, then that's rather easy in the zip task to grab them. If its the former, I think that you can do a copy to a bin folder by overriding the AfterGet target then the build will use them in its build.

-paul






Re: Team Foundation Server - Build Automation Some things I need to do in Team System...

HeyJP

The actual folder that we wind up with needs to have those files in it. I thought that we could do that by just selecting "Download from specific location" but for some reason that option seems to not work...




Re: Team Foundation Server - Build Automation Some things I need to do in Team System...

HeyJP

Once I'm able to add that path in, how do I go about using/selecting those tasks




Re: Team Foundation Server - Build Automation Some things I need to do in Team System...

Paul Hacker

For the Zip its pretty staright forward. You use CreateItem to get all the files that you want to package in the zip file. You then create the zip file and reference the files using the Output ItemName.

<Target Name="MyZipTarget">

<CreateItem Include="$(builddir)\bin\**\*.config;
$(builddir)\bin\**\*.dll;
$(builddir)\bin\**\*.exe;
$(builddir)\bin\**\*.doc" >
<Output TaskParameter="Include" ItemName="etfiles"/>
</CreateItem>

<Zip WorkingDirectory="$(etbuilddir)\bin" Files="@(etfiles)"
ZipFileName="$(DropLocation)\FileName.zip"/>
</Target>

What else is it you exacly want to do a file copy

-paul