Created
November 17, 2013 23:21
-
-
Save JayBazuzi/7519677 to your computer and use it in GitHub Desktop.
An alternate implementation of ProjectRootElementExtensions that takes the task type as a generic parameter.
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<TTask>(this ProjectRootElement projectRootElement) | |
{ | |
Type taskType = typeof(TTask); | |
projectRootElement | |
.AddUsingTask(taskType.Name, taskType.Assembly.Location, null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original is at https://gist.github.com/JayBazuzi/7519477