Instantly share code, notes, and snippets.

What would you like to do?
An extension method for MSBuild's ProjectRootElement to make adding a UsingTask have less duplication
using System;
using Microsoft.Build.Construction;
public static class ProjectRootElementExtensions
public static void AddUsingTask(this ProjectRootElement projectRootElement, Type type)
.AddUsingTask(type.Name, type.Assembly.Location, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment