How would you spend $100 on MSBuild?

We’re currently planning for our next version (aka, “Dev10” – no code name this time) and subsequent releases. In that spirit, I’d like to do a quick poll of MSBuild aficionados to help us keep our “vision” for MSBuild aligned with yours, our customers. First, a caveat – while ideally I would like to rank…


Multitargeting against .NET 2.0

If you’re using the new VS 2008 multitargeting features to target .NET 2.0 you should be aware that in VS 2008 they have a limitation related to service packs. In .NET 2.0 SP1, the CLR team has added a few types to existing .NET 2.0 assemblies. For example, DateTimeOffset has been added to mscorlib.dll. Since…


Multi-Targeting : How does it work?

So in my last post, I described the multi-targeting feature at a very high level. I discussed how there will be three frameworks that you can build “for”, and how there will be two toolsets – i.e. .NET Framework 2.0 / MSBuild 2.0 toolset, and the .NET Framework 3.5 / MSBuild 3.5 toolset. Recall that the…


MSBuild / Visual Studio aware error messages and message formats

MSBuild recognizes error messages and warnings that have been specially formatted by many command line tools that typically write to the console. For instance, take a look at the following error messages – they are all properly formatted to be MSBuild and Visual Studio friendly.     Main.cs(17,20): warning CS0168: The variable ‘foo’ is declared but…


Post Summary: MSBuild in Visual Studio

For easy reference here’s a list of all the MSBuild in Visual Studio posts we ran over the last couple of months. If you enjoyed this series please drop us a short note and let us know. Look for another series, this time on the internals of Microsoft.Common.Targets, that will start in the next week…


MSBuild in Visual Studio Part 14: Managing Project Files

One last little interesting piece of information on how Visual Studio uses MSBuild relates to the loading of project files. Each project file loaded shares the same MSBuild Engine object within Visual Studio. In addition, when we find a project-to-project reference within a project file we do our best to use an existing Project object….


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 load logger is used when projects are opened. It discards all messages…


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 reading this blog you likely already know that MSBuild is used for the…


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 of files related to the project. These are useful when the…


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 I started to doze off a bit. I’m much more of…