Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Inline UsingTask Template
<UsingTask TaskName="Foo.Bar" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
    <ParameterGroup>
      <AnnotatedProjects ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
      <ParentProjectPlatform ParameterType="System.String" Required="true" />
      <PlatformLookupTable ParameterType="System.String" Required="false" />
      <AssignedProjectsWithPlatform ParameterType="Microsoft.Build.Framework.ITaskItem[]" Output="true" />
    </ParameterGroup>
    <Task>
      <Using Namespace="System.Collections.Generic"/>
      <Using Namespace="System.Linq"/>
      <Code Type="Fragment" Language="cs">
      <![CDATA[
          //This is the body of the Execute() method;
      ]]>
      </Code>
    </Task>
  </UsingTask>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment