V2 - NullReferenceException is raised when PlatformTarget = x64 is defined
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.V2csproj 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.
I can't guess exactly, but the exception on the call stack comes from ILRepack.
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.