title: ILMerge throws System.OutOfMemoryException
body: <p>I am using SignalR, to display the data in real time from Dynamics 365  to a external web page.</p>
  
  <p>I have create a plugin, which gets triggered in Post Create of my dummy entity.
  I have reference to Micrisoft.AspNet.SignalR.Client.</p>
  
  <p>I used MSBuild.ILMerge.Task version 1.0.5. When i Rebuild the solution i get the message below.</p>
  
  <blockquote>
    <p>1>------ Rebuild All started: Project: crmd.demo.signalr.dummy, Configuration: Debug Any CPU ------
    1>  Transitive merge
    1>  Merged assemblies: C:\Test Folder\demo.signalr.dummy\demo.signalr.dummy\obj\Debug\demo.signalr.dummy.dll;C:\Test Folder\demo.signalr.dummy\packages\Microsoft.AspNet.SignalR.Client.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Client.dll;C:\Test Folder\demo.signalr.dummy\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll;
    1>C:\Test Folder\demo.signalr.dummy\packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets(87,5): error : ILMerge.Merge:    There were errors reported in Microsoft.AspNet.SignalR.Client's metadata.
    1>C:\Test Folder\demo.signalr.dummy\packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets(87,5): error :   Exception of type 'System.OutOfMemoryException' was thrown.
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========</p>
  </blockquote>
  
  <p>I tried to look in the internet to find out whats causing this problem but i could not find any solution or article explaining why does it throw this error</p>
  
  <blockquote>
    <p>There were errors reported in Microsoft.AspNet.SignalR.Client's metadata. 1>C:\Test Folder\demo.signalr.dummy\packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets(87,5): error : Exception of type 'System.OutOfMemoryException' was thrown</p>
  </blockquote>
  
  <p>I would appreciate any help.</p>
  
  <p><a href="https://i.stack.imgur.com/WIMFm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WIMFm.png" alt="Used Namespace"></a></p>
  
  <p>Project References
  <a href="https://i.stack.imgur.com/gV2QM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gV2QM.png" alt="enter image description here"></a></p>
  
  <p>Copy Local propertiy for Signal client set to true
  <a href="https://i.stack.imgur.com/xG1Mv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xG1Mv.png" alt="enter image description here"></a></p>
  
  <p>Copy Local of Crm.Sdk.Proxy, Xrm.Sdk and System.IdentityModel are set to False.
  <a href="https://i.stack.imgur.com/ILdf4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ILdf4.png" alt="enter image description here"></a></p>