3
votes

We are using TFS for maintain file versions of our database.

We do not have any .NET application in our Source Control; only HTML and supported CSS files only.

Is it possible through TFS Build Automation process to create Zip package and Deploy the package to drop location?

Note: We Do not have any .NET project or solutions only need to deploy folder(with HTML and supported files) in zip format.

I somewhere read that TFS build definition compulsorily needs .SLN files to have build project.

We don't want to build anything or test anything Just want to create zip and deploy same to drop location.

I have tried some tweaking of Build Definition. But in New Build definition in process tab it asks me for Items to build, where my selection is restricted to .NET supported files only.

2
Please provide info on version of tfs, studio your using the approaches may differ based on that, what i read so far is that you need a custom project type that will generate the zip - refer to discens answear for that. SLN files are accepted by msbuild just as project files. Either is feed to msbuild on buildmachine.drk

2 Answers

5
votes

You will need to create a custom MSBuild project file (.proj) to perform the work that you need. You can test this file locally in the command line and then when it is ready, you can point the Build process at it.

This is a good starting point for you http://www.developerfusion.com/article/84411/customising-your-build-process-with-msbuild/

The MSBuild Community Tasks (https://github.com/loresoft/msbuildtasks) contains a Zip task which should make the job a lot easier.

0
votes

Judging by your description, you are using 2010 or later. What I would do is to create a custom build template that does all of what you are looking for. If you start with default template obviously you would want to remove all of the compile and test activities and replace it with the zip and copy it to the binaries directory (From there it will be moved to the drop). You could do 1 of two things for the solution file requirement, create a fake solution file in the workspace and use that knowing it won't be compiled. Or you could, in the template, remove the Argument BuildSettings which is the object that contains the solution file and configurations.