ILMerge. Is there a task for it?

Oct 17, 2010 at 1:48 PM

Hello,

Is there a Task for ILMerge?

If not, any plan to add it?

Thank you,

Miguel

Coordinator
Oct 18, 2010 at 3:54 PM

No.

Can do in the next release if you think it will be helpful.

Mike

Oct 18, 2010 at 10:41 PM

Hello,

I think it would be a useful Task to make it easier and maybe better.

I made it work as follows (maybe it helps):

    <CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true' and '%(ReferencePath.ILMerge)'=='true'">
      <Output TaskParameter="Include" ItemName="ILMergeAssemblies"/>
    </CreateItem>
    <CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true' and '%(ReferencePath.ILMerge)'=='false'">
      <Output TaskParameter="Include" ItemName="ILRefAssemblies"/>
    </CreateItem>
    <Message Text="MERGING: @(ILMergeAssemblies->'%(Filename)')" Importance="High" />
    <Exec Command="&quot;$(ProgramFiles)\Microsoft\ILMerge\ILMerge.exe&quot; /ndebug /log:&quot;$(TargetDir)ILMerge.log&quot; /targetplatform:v4,&quot;C:\Windows\Microsoft.NET\Framework\v4.0.30319&quot; /out:@(MainAssembly) &quot;@(IntermediateAssembly)&quot; @(ILMergeAssemblies->'&quot;%(FullPath)&quot;', ' ') @(ILRefAssemblies->'/lib:%(RootDir)%(Directory)', ' ')"/>   

  <Target Name="_CopyFilesMarkedCopyLocal"/>

This merges all assemblies that in its reference contains:

<ILMerge>true</ILMerge>

The task could use a similar approach and/or have a list of assemblies in its own definition.

I think both approach could be used.

Thank You,

Miguel

Coordinator
Oct 19, 2010 at 2:11 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.