MSBuild Team Blog

"Coding ... the boring bit between builds"

Browse by Tags

Tagged Content List
  • Blog Post: 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 ]
  • Blog Post: /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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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 the...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: How To: Use the AssemblyInfoTask With Source Code Control

    Several people have written our feedback alias with problems using the AssemblyInfoTask when the projects are under source code control. When the files are checked in the AssemblyInfo files are read-only, and the task fails with an error that the file can't be updated. The best way to handle this...
  • Blog Post: How To: Retrieve the AssemblyVersion using AssemblyInfoTask

    We got a great question at msbuild@microsoft.com last week: What is the preferred method to retrieve the version of the assembly that was just built via MSBuild? Post build, we would like to automatically create and copy the assembly(ies) to version folder. If you are using the AssemblyInfoTask...
  • Blog Post: How To: Return Additional Information on Outputs from a Project

    We got a great question today from an internal team at Microsoft that is working on some custom build process for their specific application: We have a project whose output is both libraries and header files. What is the best way to return those outputs to the rest of the build process? How can we...
  • Blog Post: 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 the custom logger via the Visual Studio UI for project...
  • Blog Post: 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. [ Author: Neil Enns ]
  • Blog Post: 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 file). In general the way...
  • Blog Post: 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)' == 'Debug'>OnForThisFile<...
  • Blog Post: 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 is. I just posted a new task, AssemblyInfoTask...
  • Blog Post: 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 control Build the .sln file that...
  • Blog Post: 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). The one in the Visual Studio install folder \Program...
  • Blog Post: 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 metadata and the Copy task. Before you can copy...
  • Blog Post: 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 is done using HTML-style URL encoding. So,...
  • Blog Post: How To: Install a custom target to a well-known location

    This question came across our internal conversion alias today: We are deploying our own VS project templates and they use a custom .targets file. Since the user can install our bits anywhere they want, we can’t hardcode the path to the targets file in our .csproj file. Do you have any suggestions...
  • Blog Post: HOW TO: Beyond PreBuild and PostBuild Steps

    Do you use PreBuild and PostBuild steps that are provided in the IDE? You will find that they are still available in Visual Studio 2005 - but from within the IDE, you only get the ability to run command line batch files / scripts. Essentially, prebuild and postbuild steps get executed using the <Exec>...
  • Blog Post: How To: Write a custom logger for MSBuild

    This question came across the internal conversion alias this morning: Is there a way to send errors to STDERROR? This simple little question provides a nice lead-in to a blog entry about custom loggers, so here we go :) Whenever something interesting happens during the build process, the...
Page 1 of 2 (35 items) 12