Created
November 17, 2013 23:02
-
-
Save JayBazuzi/7519477 to your computer and use it in GitHub Desktop.
An extension method for MSBuild's ProjectRootElement to make adding a UsingTask have less duplication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.Build.Construction; | |
public static class ProjectRootElementExtensions | |
{ | |
public static void AddUsingTask(this ProjectRootElement projectRootElement, Type type) | |
{ | |
projectRootElement | |
.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