ILRepack.MSBuild.Task icon indicating copy to clipboard operation
ILRepack.MSBuild.Task copied to clipboard

V2 - NullReferenceException is raised when PlatformTarget = x64 is defined

Open dotfede opened this issue 6 years ago • 2 comments

V2.0.13

Repro project available here

Steps to reproduce:

  • Clone the above repo
  • Open the "Step2.sln" solution in VS
  • Edit the Using.ILRepack.V2 csproj and uncomment line 8
  • Rebuild All

The following build error occurs:

Object reference not set to an instance of an object. at ILRepacking.Steps.Win32Resources.PE.ImageWriter.CopySection(Section from, Section to) at ILRepacking.Steps.Win32Resources.PE.ImageWriter.Write() at ILRepacking.Steps.Win32Resources.Win32ResourceStep.Patch(String outFile) at ILRepacking.ILRepack.Repack() at ILRepack.MSBuild.Task.ILRepack.Execute()

Notice this error does not occur using latest V1.

dotfede avatar Feb 17 '19 15:02 dotfede

I can't guess exactly, but the exception on the call stack comes from ILRepack.

iRebbok avatar May 29 '20 15:05 iRebbok

I am observing the same problem if the argument --runtime win-x64 is supplied to the command dotnet build. If this parameter isn't supplied or --runtime win is supplied instead, it works.

daniol avatar Aug 11 '20 12:08 daniol