How Would You Spend $100 On MSBuild?

The MSBuild team is looking for some feedback from the community to keep their “vision” for the next version of MSBuld aligned with their customers wants and needs.  They’ve got a blog post up here that asks for you, the MSBuild experts out there, to rank various potential new features they could work on.  Here…

2

How to: Fail a Build When Tests Fail

Got an email from Martin Woodward this morning asking: What would be your preferred way to fully fail the build on test failure rather than partially succeed the build? A bit of background – Team Build 2008 marks builds as Succeeded if no errors are encountered during the build process, Partially Succeeded if compilation succeeds…

7

Building VC++ 2005 Projects With Team Build 2008

MSBuild introduced a multi-targeting feature in VS 2008 that allows it to build managed code projects that target previous versions of the .NET Framework (and all associated tools – the Microsoft.Common.targets file, the MSBuild engine itself, etc.).  Unfortunately, there is no corresponding functionality for VC++ projects, since these are still not MSBuild compatible project files. …

5

Error MSB3021 and Team Build

The error message “error MSB3021: Unable to copy file “<filename>” to “<output location>”. Access to the path ‘<output location>’ is denied” occurs when the MSBuild Copy task cannot overwrite an existing read-only file.  Typically in Team Build this error will occur because (a) there seems to be an issue in MSBuild where the same file…

6

Running Unit Tests for Individual Configurations with Team Build

The default behavior of Team Build when running unit tests is to run them for each configuration defined for the build.  That is, when you specify configurations for compilation (e.g. Debug|Any CPU and Release|Any CPU) you are also specifying them for tests.  This is true of both VS TFS Build 2005 and VS TFS Build…

2

Using the SetBuildProperties Task to Update the Log Location for a Build

One of the new tasks available in Team Build Orcas (VS 2008) is the SetBuildProperties task.  This task allows you to modify any of the settable properties of a BuildDetail object directly from you MSBuild script (TfsBuild.proj).  The settable properties include: BuildNumber.  This is often displayed in the GUI as Build Name. CompilationStatus.  A string…

2

Fancy New Command-Line Options For MSBuild

A while back I had a post on the modified command-line options for file logging in MSBuild in the 3.5 .NET Framework.  The MSBuild team has since added some cool new command-line options here that will be available in the RTM version of VS 2008 (which will include the 3.5 .NET Framework).  In particular, you can…

3

Running Tests With Team Build Orcas

The Orcas Beta 2 ReadMe contains (or should contain – let me know if it doesn’t!) the following text: On build machines with Visual Studio 2005 installed, running tests may fail with the following message:  “Failed to load tests from ‘<assembly>’: Microsoft.VisualStudio.TestTools.Exceptions.EqtDataException: UTA059: The test DLL ‘<assembly>’ was built using Visual Studio 2005, and cannot…

3

Orcas Beta 2 Object Model Documentation

A while back I posted a chm file for the Orcas Object Model…  Things have changed a bit since then, so I figured I’d post a new one for the Beta 2 release.  Remember that to view the chm file, you’ll need to right click on it in Windows Explorer, choose Properties, and click the…

7

Calling Custom Targets Within Team Build

In Team Build v1 (VSTF 2005), the CoreCompile target always invoked the Build target of the solutions specified in the SolutionToBuild item group within your TfsBuild.proj file.  To support ClickOnce deployment, an additional item group called SolutionToPublish was supported – all solutions specified in this item group had their Publish targets invoked instead of their…

6