无法获得ILMerge来构建工作

时间:2016-06-05 10:46:31

标签: c# ilmerge

我正在尝试创建单个文件的可执行文件。代码是基于.Net的,并且还依赖于一些其他库,包括SQLite。

当我编译源代码时,所有相关文件都进入Release目录,尽管SQLite DLL(sqlite3.dll)进入子目录(x86)。我认为这是因为我使用SQLite-raw而且#34;吐出" DLL的x86和x64副本。

我要尝试的初始命令行是:

ILMerge /out:GEDtoRH.all.exe GEDtoRH.exe *.dll /target:exe /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2" /wildcards /log

这会产生以下输出,让我担心:

AssemblyResolver: Assembly 'System.Runtime.WindowsRuntime' is referencing assembly 'System.Runtime'.
        ...
        AssemblyResolver: Did not find assembly in framework directory.
AssemblyResolver: Unable to resolve reference. (It still might be found, e.g., in the GAC.)

AssemblyResolver: Assembly 'System.Runtime.WindowsRuntime' is referencing assembly 'System.Threading.Tasks'.
        ...
        AssemblyResolver: Did not find assembly in framework directory.
AssemblyResolver: Unable to resolve reference. (It still might be found, e.g., in the GAC.)

AssemblyResolver: Assembly 'System.Runtime.WindowsRuntime' is referencing assembly 'System.IO'.
        ...
        AssemblyResolver: Did not find assembly in framework directory.
AssemblyResolver: Unable to resolve reference. (It still might be found, e.g., in the GAC.)

Location for referenced module 'sqlite3' is ''
  1. 我是否应该关注未解决的参考文献?我问的原因是因为完成的可执行文件不起作用。它在这一行中以空引用异常(对象引用未设置为对象的实例)打破:
  2. file = await StorageFile.GetFileFromPathAsync(filename);

    可执行文件的未合并版本工作正常:(它不是"#34;文件名"由于我尝试添加一些额外的测试而且它很好。

    1. 尽可能尝试将sqlite3.dll添加到要摄取的内容列表中,如果我尝试,ILMerge只会抱怨"无法加载程序集"错误。

1 个答案:

答案 0 :(得分:1)

由于SQLite不是.NET库,因此它不包含任何要合并的IL