7 Steps to MSBuild

Brennan has a great post about all things MSBuild, and covers good breadth on both concepts, as well as the many things you may want to drive with MSBuild (unit testing, web deployment projects, etc). Check it out! [ Author : Faisal Mohamood ]

4

/p property values are immutable – (sort of)….

Hello there – sorry for the long absence, but we’re back and hopefully I’ll keep this going again. So there was a recent forum post about how property values that are specified from the command line are immutable – i.e. it is not straightforward to change them from within the project file. Well, this is…

6

How To: Remove the Up-To-Date Check From the AssemblyInfoTask

Every couple of weeks I get mail from someone who is using the AssemblyInfoTask on a build machine under source control. The question typically goes like this: I added the .targets file to my project, and it works fine on my dev machine, but doesn’t do anything when I’m running it in the build lab….

11

How To: Bypass Post-Build Steps in a Build Lab Environment

(Can you tell I’m going through my folder of interesting MSBuild questions today?) Here’s another good question that came across our internal discussion alias last week: Is there a quick and easy way to bypass the PostBuild steps in a project file that was created with VS.NET 2005? I am trying to set up a master…

4

How To: Distribute Your Custom Task and .Targets file

We’ve had variations of the same question on how to distribute tasks come through both internal and external channels in the last couple of weeks. Here’s one example: If we have a product that is installing custom MSBuild tasks, are there any type of guidelines on where they should be installed, do they need to…

3

How To: Exclude Multiple Files From a Wildcard

We got the following question on our internal conversion discussion alias today: Is there a way to exclude two or more items from an ItemGroup using the “exclude” attribute without using a wildcard? It turns out the way to do this wasn’t clear from our existing MSDN Documentation. Brett, our documentation writer, has a fix…

18

How To: Add Custom Process at Specific Points During Build (Method #2)

Back in November I wrote about a quick-and-dirty way to add custom build process into the standard Visual Studio build by overriding pre-defined targets that exist in Microsoft.Common.Targets. While this method works fine for internal build processes it can be brittle if you’re trying to deploy your build process to other teams or customers. In…

19

How To: Use the AssemblyInfoTask With ASP.NET Web Deployment Projects

About once a week we get a question from someone who wants to know how to set the assembly version information on ASP.NET projects. I spoke with Bradley, a development lead over in the ASP.NET team who worked on the Web Deployment Projects, and it turns there are two ways you can do this. If…

3

How To: Obtain Initial Property Values in a Logger

We got a question on our MSBuild Feedback alias today that went something like this: How do I obtain all the initial property values in the project file in my custom logger? It’s not immediately obvious from our object model, but you can do this. In the ProjectStarted event the ProjectStartedEventArgs contains a Properties member….

3

How To: Implementing Custom Tasks – Part I

While MSBuild is all about build customization,we never really blogged about what is involved in implementing custom tasks.  Partly, I suppose that’s because implementing a custom task is as easy as falling off a log most of the time: 1) Subclass Microsoft.Build.Utilities.Task abstract class 2) Implement the Execute method But there’s a lot more to…

53