Out of the box, Team Foundation Server 2010 Build does not support building of setup projects (.vdproj). Although, you can modify the DefaultTemplate.xaml or create your own in order to achieve this. I had to try bunch of different blog post's and finally got it working with a mixture of all those posts.
Since you don’t have to go through this pain again, I have uploaded the Template which you can use right away : https://skydrive.live.com/redir?resid=65B2671F6B93CDE9!310
- Download and CheckIn this template into your source control. Modify your Build Definition to use this template. Unless you have CheckedIn the template, it wont show up in the template selection section in the process task of build definition.
- In your Visual Studio Solution Configuration Manager, make sure you specify to build the setup project also.
- You will get this warning in you build : “The project file “*.vdproj” is not support by MSBuild and cannot be build.
Hope it helps.
Reference blog posts I had used: