Archive for the 'msbuild' Category

MSBuild: Web Deployments (5 of 7)

Thursday, November 30th, 2006

The new ASP.NET 2.0 Website model does not include a project file. This fact has made for a troubling deployment process. You can use Visual Studio to run a build and deploy a compiled copy of the website, but that means you must have Visual Studio to run the build. Fortunately Microsoft released an Add-On for Visual Studio to generate a Website Deployment Project which you can use without starting Visual Studio.

The Website Deployment Project did not make it into the Visual Studio 2005 release but was released shortly after the .NET 2.0 launch to satisfy the clear need for such a deployment solution. The features included in this new project type were the result of requests during the .NET 2.0 beta 1 and beta 2 cycles.

(more...)

MSBuild: Configurations (4 of 7)

Wednesday, November 29th, 2006

The default configurations for every Visual Studio project are Debug and Release. These different configurations allow you to set different properties which are used during the build, such as the output folder. Naturally the Debug configuration has debug options enabled while the Release does not. But there is much more you can do with a configuration, and you are not limited to just these two defaults. You can copy either of them or start from scratch with a new configuration as shown in the image to the right. Simply open the Configuration Manager in Visual Studio.

Normally I stick to the Debug and Release configurations. But when I work with a build server I like to define a unique configuration which will run a little differently and cause additional work to be done which is not normally done on the developer workstations.

(more...)

MSBuild: Dependencies (3 of 7)

Wednesday, November 29th, 2006

I often use a build script to prepare a project the first time it is pulled out of source control. Normally the Solution and Project files handle all of the dirty details necessary to build the project but with ASP.NET 2.0 some trouble was introduced. The new ASP.NET 2.0 Website model has a great deal of flexibility, but it gained that flexibility by eliminating the project file which changed how dependencies are managed.

(more...)

MSBuild: Item Groups (2 of 7)

Wednesday, November 29th, 2006

An ItemGroup in an MSBuild script defines a list or collection of items. These items are typically files. Often you may use a collection to define a static set of files which exist prior to the build running, but sometimes the build generates output files which are not. In the latter case there is a different approach you must use in defining an ItemGroup definition.

(more...)

MSBuild: Basics (1 of 7)

Wednesday, November 29th, 2006

I have spent a good deal of time with MSBuild scripts the past couple of years as I have worked on various projects. As I have attempted to make these scripts bend to my wishes I have gradually improved the sample MSBuild script I carry along to each new project. In this series I will cover various ways to use MSBuild and include some tips on what you can do to make your scripts work better for you. But first, what is MSBuild?

The MSBuild utility was introduced with .NET 2.0 and is available with the runtime even if Visual Studio is not installed. It allows for build automation of most Visual Studio project types. Previously, a utility called NAnt was used as a build tool for .NET 1.1 which is modeled after Ant, a tool to build Java projects. The introduction of MSBuild as an official utility was very welcome among the development community as it provides close integration with the existing project and solution files created by Visual Studio. This close integration cuts down on the amount of detail necessary for the build scripts.

(more...)

Upgrading CruiseControl.NET from 1.0 to 1.1

Wednesday, October 11th, 2006

On October 1 a new release of CruiseControl.NET was posted. See the release notes for changes. Since I had strange problems with my automated builds I felt it was time to upgrade.

(more...)