peters / ILRepack.MSBuild.Task

MSBuild task for ILRepack which is an open-source alternative to ILMerge.
Other
83 stars 31 forks source link

V2 - NullReferenceException is raised when PlatformTarget = x64 is defined #31

Open dotfede opened 5 years ago

dotfede commented 5 years ago

V2.0.13

Repro project available here

Steps to reproduce:

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.

iRebbok commented 4 years ago

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

daniol commented 4 years ago

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.