DlrTaskFactory Class | MSBuild Extension Pack Help 4.0.12.0 |
A task factory that enables inline scripts to execute as part of an MSBuild-based build.
Inheritance Hierarchy
Namespace: MSBuild.ExtensionPack.TaskFactory
Assembly: MSBuild.ExtensionPack.TaskFactory.Dlr (in MSBuild.ExtensionPack.TaskFactory.Dlr.dll) Version: 4.0.0.0
The DlrTaskFactory type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DlrTaskFactory |
Methods
Name | Description | |
---|---|---|
CleanupTask |
Cleans up the task.
| |
CreateTask |
Creates the task.
| |
GetTaskParameters |
Gets the task parameters.
| |
Initialize |
Initialize
|
Properties
Name | Description | |
---|---|---|
FactoryName |
Gets the name of the factory.
| |
TaskType |
Gets the type of the task.
|
Examples
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="HelloWorld" TaskFactory="DlrTaskFactory" AssemblyFile="$(TaskFactoryPath)MSBuild.ExtensionPack.TaskFactory.Dlr.dll"> <ParameterGroup> <Name Required="true"/> <TaskMessage Output="true"/> </ParameterGroup> <Task> <Code Type="Fragment" Language="rb"> <!-- Make this a proper CDATA section before running. --> [CDATA[ self.task_message = "Hello #{name} from Ruby".to_clr_string log.log_message(task_message); ] </Code> </Task> </UsingTask> <PropertyGroup> <YourName Condition=" '$(YourName)'=='' ">World</YourName> </PropertyGroup> <Target Name="Build"> <HelloWorld Name="$(YourName)"> <Output PropertyName="RubyOut" TaskParameter="TaskMessage"/> </HelloWorld> <Message Text="Message from task: $(RubyOut)" Importance="high" /> </Target> </Project>
See Also