Hack the Build: Programmatically Converting Older VS .NET Projects to MSBuild

Jomo Fisher–There are plenty of reasons you might want to programmatically convert projects from VS .NET 2003 format to MSBuild format. Maybe you have a bunch of old .csproj files and you’d like to convert them in batch. Maybe you’d like to keep your projects in VS7 format and convert them to MSBuild format on…


MSBuild Sample Code Demonstrating How to Convert Older Projects to VS8 Format

/*Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htmWritten by Jomo Fisher*/ using System;using System.Text;using Microsoft.Build.Conversion; class ConvertProject{ static void Main(string[] args) {  ProjectFileConverter c = new ProjectFileConverter();  c.OldProjectFile = args[0];  c.NewProjectFile = args[1];   c.Convert(); }}


Hack the Build: New MSBuild Resources on Channel 9

Jomo Fisher — Check out the new MSBuild site and MSBuild wiki. Alex Kipman posted a video of our bug triage team in action–if you like to know how things work behind the scenes this is video is for you.


MSBuild Sample Code Demonstrating How to Target 1.1 Framework with VS Whidbey Beta 1

<!–Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htmWritten by Jomo Fisher–><Project xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″>     <Import Project=”$(MSBuildBinPath)\Microsoft.CSharp.targets” />     <PropertyGroup>        <CompileDependsOn>$(CompileDependsOn);Compile_1_1</CompileDependsOn>    </PropertyGroup>     <Target       Name=”MainBuiltProjectOutputGroup_1_1″       Outputs=”@(TargetName11->’%(FullPath)’)”>        <CreateItem Include=”bin\$(Configuration)(1_1)\$(TargetFileName)”>  <Output TaskParameter=”Include” ItemName=”TargetName11″ />         </CreateItem>  <Message Text=”==>@(TargetName11)”/>    </Target>     <Target       Name=”ResolveProjectReferences_1_1″      Condition=”‘@(MSBuildProjectReference)’!=””>  <!–Build the referenced project. –>        <MSBuild              Projects=”@(MSBuildProjectReference)”              Targets=”Build”             …


Hack the Build: Targetting .NET Runtime 1.1 Step-by-Step

Note: This article is about targetting CLR version 1.1 with Whidbey Beta1. If you’re interested in Beta2 see this article.   Jomo Fisher–MSBuild doesn’t ship with a way to target CLR version 1.1. I discussed the reasons for this in a prior blog entry and I even said that I respected the decision given our resource limitations….


Hack the Build: Target Overriding Step-by-Step

Jomo Fisher–John Lam recently mentioned Target Overriding as a useful tool for extending a pre-existing build process. In MSBuild, a target is a grouping of build functionality—there’s a good MSDN article here that gives some details. The build scripts that ship with VS are largely collections of targets that do certain useful things. For example,…


Hack the Build: Lay of the Land

Jomo Fisher–I think it would be helpful to take a step back and look at the files that are part of MSBuild.   The binaries are all installed in the framework folder (e.g. c:\Windows\Microsoft.NET\Framework\v2.0.xxxx):   MSBuild.exe – is the command-line driver. Any C# or VB project you create in VS can also be passed to…


Hack the Build: Peeking under the Hood

Jomo Fisher–I like to know how things work. When someone says “Trust me” I get suspicious and more curious than I might have been. I want to know why I should trust them. I want to know the details.   If you build your application in VS Beta1 and you have the output window open…


MSBuild and VS .NET 2003

A lot of people have asked about whether Microsoft will support MSBuild against the VS .NET 2003 version of the CLR. The answer is that we really, really want to but don’t think we have the resources to make it work right. If you have a dollar to spend then you want to use it…


Hack the Build: An Introduction

Jomo Fisher–I’m a developer on the MSBuild team and I own a big chunk of the build rules that get run when you build your C# or VB application. If you wanted to find me, you could draw a line west from Jeff Callahan’s office (http://blogs.msdn.com/jeffcal) and draw a line south from Alex Kipman’s office…