I have a small problem with TFS. I am trying to zip files after the build is complete and send to the drop location. I am using the following command to call 7zip to zip the file.
Command:
<Exec Command="7z a "$(BuildNumber)_Sandbox.zip" "$(DropLocation)\$(BuildNumber)""/>
The build runs but for some reason the files are never zipped up despite the build log showing that the archive command is run.
Log:
Creating archive Sandbox DB Update_20120509.1_Sandbox.zip
Compressing Sandbox DB Update_20120509.1\File1.sql
Compressing Sandbox DB Update_20120509.1\File2.sql
Compressing Sandbox DB Update_20120509.1\RefreshAll\DLL1.dll
Compressing Sandbox DB Update_20120509.1\RefreshAll\Results\Results.txt
Everything is Ok
Done Building Project "S:\Source\5\TFS Sandbox\Sandbox DB Update\BuildType\TFSBuild.proj" (EndToEndIteration target(s)).
Build succeeded.
I am using TFS2008 build scripts. If this is not the best method, can someone point me to an easier way to zip files. I tried looking into the MSBuild extension zip functionality, but it seems a lot more complicated than just running the command above.
Thanks
A wild shot: you have not added a path to the zip file, so it might be in the current directory of the “EXEC” process, which is most likely not the directory you want. Add the directory to the path of the zip might help.