在ILMerge的帮助下,尝试使用内部所有库构建可执行文件:
"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" MyScan.exe DirectShowLib.dll Google.Apis.Auth.dll Google.Apis.Auth.PlatformServices.dll Google.Apis.Core.dll Google.Apis.dll Google.Apis.PlatformServices.dll Google.Apis.Sheets.v4.dll log4net.dll Newtonsoft.Json.dll zxing.dll zxing.presentation.dll /out:MyScan2.exe
dll的错误之一已过期:
An exception occurred during merging:
ILMerge.Merge: There were errors reported in Google.Apis.Auth's metadata.
The pdb associated with c:\Projects\Myscan\MYScan\bin\Release\Google.Apis.Auth.dll is out of date.
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
是什么意思?为什么Google.Apis.Auth.dll
pdb已过期,如何解决?我已经清理并重建了项目,但这没有帮助。
UPD
我必须删除与Google api相关的所有pdb。之后,我得到了错误:
Unresolved assembly reference not allowed: System.Core.
at System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly)
at System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type)
at System.Compiler.Ir2md.WriteTypeDefOrRefEncoded(BinaryWriter target, TypeNode type)
at System.Compiler.Ir2md.WriteTypeSignature(BinaryWriter target, TypeNode type, Boolean instantiateGenericTypes)
at System.Compiler.Ir2md.WriteTypeSignature(BinaryWriter target, TypeNode type, Boolean instantiateGenericTypes)
at System.Compiler.Ir2md.GetBlobIndex(TypeNode type)
at System.Compiler.Ir2md.GetTypeSpecIndex(TypeNode type)
at System.Compiler.Ir2md.VisitReferencedType(TypeNode type)
at System.Compiler.Ir2md.VisitMethod(Method method)
at System.Compiler.Ir2md.VisitClass(Class Class)
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)
答案 0 :(得分:0)
我不确定,但是我遇到了相同的错误
我发现如果在使用ilmerge之前重命名了ddl,即使我也重命名了pdb,也遇到了错误。
为我保留原始文件名