Team Build and ClickOnce

יום שישי, ספטמבר 12, 2008

The other day I got a question: How can I deploy an app via ClickOnce using Team Build? There is not out of box way to do that, but we can do it with a simple workaround: we should overload the target AfterCompile in TFSBuild.Proj to call MSBuild Task Publish and can pass the PublishDir property: <Target Name="AfterCompile"> <MSBuild Condition=" '@(SolutionToBuild)'!='' " Projects="@(SolutionToBuild)" Properties="Configuration=%(ConfigurationToBuild.FlavorToBuild); Platform=%(ConfigurationToBuild.PlatformToBuild); SkipInvalidConfigurations=true; VCBuildOverride=$(MSBuildProjectDirectory)\TFSBuild.vsprops; FxCopDir=$(FxCopDir);OutDir=$(OutDir); PublishDir=$(OutDir); ReferencePath=$(ReferencePath); ...
תגיות: ,
אין תגובות

Configure Team Foundation Build for an Incremental Build

יום חמישי, יוני 12, 2008

A question I got today: "How can I configure my Team Build for an incremental build?". Well, it's simple. Team Build 2005 Add the PropertyGroup definition to the end of the TFSBuild.proj file, before the closing </project> tag. Set the following properties: <PropertyGroup> <SkipClean>true</SkipClean> <SkipInitializeWorkspace>true</SkipInitializeWorkspace> <ForceGet>false</ForceGet> </PropertyGroup>   Team Build 2008  Set IncrementalBuild property to true. To do it, add the PropertyGroup definition to the end of the TFSBuild.proj file, before the closing </project> tag. <PropertyGroup> <IncrementalBuild>true</IncrementalBuild> </PropertyGroup>   Source...
אין תגובות

Team Build – Dynamicly adding project outputs to GAC

It's occurs sometimes  that after a successful build, we need to iterate through all assemblies outputs and install each assembly to the gac.. Solution: First, we have to use a CreateItem task like:<CreateItem Include="&quot;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\GacUtil.exe&quot; -i $(DropLocation)$(Slash)$(BuildNumber)$(Slash)Release/*.dll"> <Output TaskParameter="Include" ItemName="AssembliesToGac"/> </CreateItem> Next step is to batch it to another target:<Exec Command="someCommand @(AssembliesToGAC)" />   Enjoy!  
אין תגובות

How To Deploy Data Dude Project Changes using Team Foundation Build

יום שני, אפריל 28, 2008

When you want to build and deploy database projects with team build you need to edit the database project file and the Team Build file. That's because database projects store any non-default values for the TargetDatabase, TargetConnectionString, and DefaultDataPath properties in a <ProjectName>.dbproj.user file.  *.user files are not checked into version control in order to let every user use different values.   Step 1 - Modify build project file (team build .proj file) Open the BuildDefinition.proj file, and at the bottom of the file, between the </ItemGroup> element and the </Project> element, add the following: ...
אין תגובות

NDepend – Great Static Analyzer

יום חמישי, מרץ 20, 2008

Few week ago, I've been asked by Patrick Smacchia, a C# MVP to try this tool. I really want to thanks Patrick to give me the chance to evaluate a professional edition. I installed it and start working with. After using this tool, it's my most favorite tool to reviewing my code! NDepend is an excellent tool that is designed to provide a very deep analysis of your compiled code to help you understand and control your development effort by managing both the quality and the complexity of your code. NDepend works in a very similar way...

Running Tests On TFS Build Machine

יום חמישי, מרץ 13, 2008

Often I asked "What do I need to install on the TFS build machine in order to run tests?" Well, the answer is simple. In VSTS 2005 you have to install the Tester or Suite editions on the Build Machine to run tests (even Unit Tests). In VSTS 2008 installing the Developer Edition version is enough.
אין תגובות

Custom Build Number In Team Build

יום חמישי, דצמבר 13, 2007

Many users want to modify the default build number of Team System Team Build which looks like: <Build-Type-Name>_<Date>.XXX. You can change it by writing a custom task and call it in the BuildNumberOverrideTarget target of the MSBuild file. In this example the task will generate a unique build number based on current time: using System; using Microsoft.Build.Utilities; using Microsoft.Build.Framework; namespace MaorDavidBlog.Samples.MSBuild { public class BuildNameGenerator:Task { private string _buildName; public override bool Execute() ...
אין תגובות

Building VS 2008 projects with TFS 2005

יום שבת, דצמבר 8, 2007

When you try to build VS 2008 solutions with Team Foundation Build 2005 you get: MSB5014 - File format version is not recognized. I posted about it and one of the comments (by Eran Kampf) linked to Mitch Denny's approach. Customers ask me about it a lot and this is the best approach to deal with the problem Buck Hodges said that the best "workaround" is to upgrade to TFS 2008. But not all of you will upgrade soon to 2008. Until then, use Mitch's approach. Technorati Tags: Team Build,Team Build 2008
אין תגובות

Team Foundation Build 2008 New Features Video

יום ראשון, דצמבר 2, 2007

There's a great new video on MSDN by Richard Hundhausen introducing the new features in Team Foundation Build 2008: How Do I: Learn the New Features and Capabilities of Team Foundation Build 2008? The video covers the major new features and provides a great introduction to the product. Technorati Tags: TeamBuild,TFS 2008,Team Build 2008
אין תגובות

TFS Build Lab 1.0 Released

יום שבת, נובמבר 3, 2007

TFSBuildLab 1.0 is released on CodePlex.   This is a project to simplify the day to day operations when using automated builds on TFS. This project handles common Team System issues such as: Continuous integration builds Scheduled builds Build queuing Event notifications Manual and automated build cleanup What features included in V1.0: Service Automatic rescheduling when adding new scheduled trigger. A report for displaying statistics from the triggers and retention policies. Support for overriding build script parameters both for CI and queued builds. Support for only deleting...
אין תגובות