dotnet / ILMerge

ILMerge is a static linker for .NET Assemblies.
MIT License
1.23k stars 170 forks source link

Object reference exception #36

Closed QuietMark-Vista closed 6 years ago

QuietMark-Vista commented 6 years ago

An exception occurred during merging: Object reference not set to an instance of an object. at System.Compiler.Ir2md.GetModuleRefIndex(Module module) at System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type) at System.Compiler.Ir2md.GetTypeSpecIndex(TypeNode type) at System.Compiler.Ir2md.VisitReferencedType(TypeNode type) at System.Compiler.Ir2md.VisitStruct(Struct Struct) at System.Compiler.Ir2md.VisitModule(Module module) at System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation) at System.Compiler.Ir2md.WritePE(Module module, String debugSymbolsLocation, BinaryWriter writer) at System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols, Module module, Boolean delaySign, String keyFileName, String keyName) at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Module module) at ILMerging.ILMerge.Merge() at ILMerging.ILMerge.Main(String[] args) This is the first time I have tried merging at /ver:4.5 with a specific /lib:C:\Windows\Microsoft.NET\Framework64\v4.0.30319, but did not expect this.

Windows 10, VS 2017 15.5.6. /log is turned on, too.

What else might help track this down?

QuietMark-Vista commented 6 years ago

My humble apologies. Error between keyboard and chair. I mistakenly used /ver: instead of /targetplatform:4. All working again!