Course info
Jul 11, 2011
2h 19m

This course starts with the essentials needed to use MSBuild and explores using MSBuild in build automation scenarios.

About the author
About the author

David Starr has worked in technology leadership positions for over 20 years. He specializes in agile software development practices, patterns and practices, and judicious application of various technologies within development teams. He is a 5 time Microsoft MVP in Visual Studio and a technical instructor with Pluralsight where he focuses on the software development practices and developer tooling curricula. David blogs at, is a frequent contributor at conferences and a frequent writer. He has successfully led many product development teams and is a technical learning professional.

More from the author
Client Side React Router 4
1h 59m
Mar 2, 2018
Getting Started with IntelliJ CE
2h 47m
Sep 1, 2017
More courses by David Starr
Section Introduction Transcripts
Section Introduction Transcripts

MSBuild Essentials
Hello. My name is David Starr and welcome to this Pluralsight introductory course to MSBuild. This first module is going to introduce some bare essentials of MSBuild that we'll be building on in future modules. MSBuild is one of those technologies that as a. NET developer I just really need to know it. It's just this ubiquitous thing that sits in the background of our life and in order to be effective as a. NET developer, I really should have a good sense of how MSBuild works. It's almost like if you're a web developer, you really need to be able to just bleed HTML out of your fingertips at a moment's notice and MSBuild is similar in that it's just one of those technologies that we really need to know at a base level of being a professional software developer. It happens to be extensively used in the process of creating software whenever we use Visual Studio. In this module we're going to get a general overview of the MSBuild technology and then we'll take a look at what it means to be an MSBuild project file. Now it turns out these MSBuild project files are sprinkled all throughout your life already, which you may or may not know and we'll take a look at the composition of those project files and once we get into working inside our MSBuild project files, that gives us an opportunity to look at things like targets, tasks, properties, and items, which are some elements of the MSBuild expression language, if you will, that we'll be using to do work in other modules throughout the course. So these four things--targets, tasks, properties, and items will set the stage for our base capabilities in working with MSBuild.

MSBuild Execution Lifecycle
Hello, this is David Starr. Welcome back to Introduction to MSBuild. In this module we'll be taking a closer look at the execution life cycle of an MSBuild script, specifically how targets work with each other throughout the execution of an MSBuild script. The primary focus of this module is the fact that very rarely, almost never, would we want a build script with only one target. Real-world build scripts have many targets in them and sometimes those targets are distributed across multiple files and so we'll look first at explicit target invocation. That is, how do we call targets by name very deliberately. Now we've already seen a flavor of this by passing target names on the command line. We'll revisit that and look at some other techniques as well. We'll also see how targets can depend on each other. Target C might depend on target A, for example. A very real-world condition for this might be that I want to delete everything in my work space before I get the latest version of code from version control before I do a build, right? So there are three targets right there and they need to execute in a specific order. And finally we'll see how distributing our build script across multiple files impacts the execution life cycle and how we structure our overall build solution.

Custom Tasks
Hello. This is David Starr and welcome back to this introduction to MSBuild. In this module we're going to be talking about custom tasks. Now it turns out that MSBuild comes with a lot of built-in tasks to let us do things like make directories on the fly, copy files from one location to another, even compile source code. We can do that with the CSC task, which a pretty thin wrapper over the CSC. exe command line C# compiler. Things like that are already built in, but of course there are lots of things that we would like MSBuild to do that aren't included in the base set of tasks that come with MSBuild. There happens to be a large community out there of people who create custom tasks, share them with each other, and you can even write your own, so we're going to look at that in this module. Specifically, we'll see how to use custom tasks in our own build scripts. We basically have to reference them before we can use them so that's what we'll do and we'll see a very popular custom task library that you might want to go download and take advantage of. Now after we do that, we'll look at building our own custom tasks and there are a couple of ways to do that. We'll look at implementing an interface, taking advantage of an abstract base class, and even building custom tasks with C# code inline in our MSBuild script itself. This is a new feature for version 4. 0. So, let's get started looking at custom tasks.

MSBuild and Team Foundation Server
Welcome to the last module in the Introduction to MSBuild course, MSBuild and Team Foundation Server. The materials in this module are shared with another module, one that lives in the Team Build 2010 course. It's particularly relevant for us in the MSBuild course because it examines how Team Foundation Server interacts with MSBuild and how the build strategy for Microsoft is evolving around the MSBuild technology.