Welcome to MSDN Blogs Sign in | Join | Help

November 2005 - Posts

How To: Specify Long Command Lines to MSBuild

Sometimes when using MSBuild.exe the command lines can get pretty darn long and hard to manage. This is particularly true if you're using a custom logger that takes parameters. I also ran into some trouble when I was trying to pass an escaped string to
Posted by msbuild | 7 Comments
Filed under: ,

Sprint 10 Backlog Items

My bad for not getting this up sooner. We've actually been going on Sprint 10 for the last two weeks. As with Sprint 9 we've split it into one sprint for platform work and one for dogfood work. We've made a shift in our platform work for Sprint 10. During
Posted by msbuild | 0 Comments

How To: Perform Nightly Builds with Team Foundation Server

Edit: Ok, after talking with Khushboo and given Niels's comment, it's clear that the article I linked to is woefully out of date. Please ignore this post. If you want to perform nightly builds with Team Foundation Server, tfsbuild.exe is the tool to use.
Posted by msbuild | 5 Comments
Filed under: ,

How To: Insert Custom Process at Specific Points During Build

Today Kieran, Faisal, and I met with one of our partners to give them an introduction to MSBuild. During the discussion one of them asked us about the different places someone can plug into the standard Visual Studio build process (as defined by the Microsoft.Common.Targets
Posted by msbuild | 5 Comments
Filed under: ,

MSBuild in Visual Studio Part 13: The Three Custom Loggers

We’re written in the past about how to write custom loggers , and you probably won’t be surprised to learn that Visual Studio makes use of custom loggers when interacting with MSBuild. There are three separate loggers, each with its own purpose. The project

MSBuild in Visual Studio Part 12: Compiling Inside Visual Studio

We’ve touched briefly on how the Compile target is used by Visual Studio, but only on how it relates to Intellisense. Of course while Intellisense is nice, most people would like to actually compile a complete application using Visual Studio. If you’re

How To: Conditionally Apply Metadata to Items

Last week we got a great question over on our forum about applying metadata to items depending on a condition. What the author wanted to was something like this: <ItemGroup> <Compile Include="MyClass.boo"> <DefineConstants Condition=" '$(Configuration)'
Posted by msbuild | 0 Comments
Filed under: ,

MSBuild in Visual Studio Part 11: Other Special Targets

The last two entries walked through how the Compile target is used by the IDE to drive certain features. There are a number of other targets that get called at various times. Several targets exist to help compute project output groups, which are sets

MSBuild in Visual Studio Part 10: What Does MSBuild Have To Do With Intellisense?

In our last post we started to dig into how the Compile target is used by Visual Studio at design time, and the details around the in-process compiler. When Rajeev was talking about the in-process vs. out-of-process compiler during the talk I must admit

A Pretty Picture of Our Project Dependencies

As you may have noticed from our recent posts on build parallelization, we're thinking a lot lately about project dependencies. One thing I've always wanted is a tool that let me visually look at the project-to-project references that make up my application.
Posted by msbuild | 6 Comments

How To: Update Assembly Version Numbers with MSBuild

UPDATE: For information on the "Y7K" or "2007" issue, see our new blog entry . One of our most frequently asked questions is: "How do update my assembly version numbers at build time?". Unfortunately our answer has been "you can't". Until today, that

Sprint 9 Review

It’s been about a month since we last talked about Sprint 9, and it’s time for an update. If you recall, the MSBuild team was planning on two parallel sprints: one for platform investigations and one to support internal dogfooding efforts . Last Friday

How To: Wrap Custom Targets Around a Solution Build

We got the following question on the msbuild@microsoft.com alias last week: I'm migrating from VS2003/NAnt to VS2005/MSBuild for my build solution, and want to create a custom project that does the following: Pre-build actions Sync my source from source
Posted by msbuild | 197 Comments
Filed under: ,

MSBuild in Visual Studio Part 9: Compiling at Design-Time Using the In-Process Compiler

All the posts so far in our series have talked about reading from and writing to project files. I hope you’ve found all that interesting, but today we’re going to shift gears a bit and start to talk about how Visual Studio leverages MSBuild during design-time.

Parallelizing Visual Studio solutions

One of the MSBuild Team’s scenarios for multi-proc builds is the automatic parallelization of Visual Studio solutions. For this scenario, we want Visual Studio to automatically parallelize all “independent” projects, and serialize all “dependent” ones.
Posted by msbuild | 3 Comments
Filed under: ,

MSBuild support for targeting the .NET FX 1.1 runtime

Being able to target .NET 1.1 has been by far the most popular request that we have heard from our customers - and I am very pleased to say that it is finally coming! Craig Lichtenstein is working on enabling this important scenario, and has blogged about
Posted by msbuild | 273 Comments

Restrictions on the Exclude attribute in an item tag

An item exclude only works with the corresponding include on the same actual item tag-- in other words, if the exclude occurs in a later item tag of the same type, it will not affect any files previously included. For example: suppose you have files a.cs,
Posted by msbuild | 6 Comments
Filed under:

MSBuild in Visual Studio Part 8: Writing Items To the Project File

Reading items from the project file, as we discussed in our last post , is quite straightforward and doesn’t have much in the way of interesting gotchas. Have no fear! We’ll make up for that with all the gotchas around writing items back. The first thing

How To: Customizing Project File Intellisense in Visual Studio

So Neil pointed out that you can find the MSBuild schemas in either the .NET Framework install path, as well as the Visual Studio install location. The one in the Framework folder ships as a reference (since MSBuild really is part of the .NET redist).
Posted by msbuild | 2 Comments
Filed under: ,

How To: Recursively Copy Files Using the <Copy> Task

Have you ever run into a situation where you had to recursively copy files from one folder into another as a part of your build process? We certainly have run into it a few times, and I thought I'd share with you a neat trick that involves the use of
Posted by msbuild | 21 Comments
Filed under: ,

Channel 9 Video of the Team Build Team

We've mentioned Team Build a couple of times here in the past, and I discovered they have a video up at Channel 9 . If you skip forward to about the 16 minute mark you'll get to see a demo of Team Build. It's very slick, and includes the ability to run
Posted by msbuild | 0 Comments
Filed under:

Where is the MSBuild schema file?

Every so often we get asked where the schema file is for the MSBuild XML. People (correctly) assume we have one since it is referenced as a namespace in every project file. Our schema is installed in \windows\Microsoft.NET\framework\v2.0.50727\Microsoft.Build.xsd
Posted by msbuild | 4 Comments
Filed under:

How To: Escape the Percent Sign in MSBuild

This is actually somewhat amusing, especially considering our recent set of posts on escaping properties and items. We got a question over on our forums today that amounted to "how do I escape the percent sign in an item include"? All escaping in MSBuild
Posted by msbuild | 0 Comments
Filed under: ,

MSBuild in Visual Studio Part 7: Reading Items From the Project File

I don’t know about everyone else, but I’m pretty sick of escaping and properties [:)] It’s time to move on to the other major way the project system leverages MSBuild, and that’s the wonderful world of items. After all, without items there’d be no way

TeamBuild Properties and Targets

One of the neat things about MSBuild is how it can be customized by other people. The Team Build group, which created the Team Build functionality in Visual Studio Team System, went and extended MSBuild with custom targets and properties specifically
Posted by msbuild | 0 Comments
Filed under:

MSBuild in Visual Studio Part 6: Quiz Answers, Round 2

If you’re joining us mid-stream, these are answers to a quiz on property escaping when saving properties back to the project file. Let’s pick up right where we left off in our last post. DisabledWarnings: Not escaped This is a great example of why we
 
Page view tracker