【问题标题】:Unmanaged Exports Error when Building Assembly with FinalBuilder使用 FinalBuilder 构建程序集时出现非托管导出错误
【发布时间】:2013-12-13 16:38:11
【问题描述】:

我使用 R. Gieseckes UnmanagedExports dll 完成了一个带有导出方法的程序集。在 VS 2012 中构建这个程序集效果很好。但是将程序集构建为 使用 FinalBuilder 的更大解决方案会引发以下错误:

解析 IL:解析 1517 行 IL 耗时 120 毫秒。 C:\BuildSource\branches\Standard\Projects\Intf_New\Interfaces\StdInterface\packages\UnmanagedExports.1.2.4.23262\tools\RGiesecke.DllExport.targets(42,5):错误:Der Index,basierend auf 0 (null), muss größer als oder gleich Null sein, und kleiner als die Größe der Argumentenliste。 bei System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) bei System.String.Format(IFormatProvider provider, String format, Object[] args) bei RGiesecke.DllExport.DllExportNotifier.Notify(Int32 严重性,字符串代码,字符串文件名,Nullable1 startPosition, Nullable1 endPosition,字符串消息,Object[] 值)在 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportNotifier .cs:泽勒 135。 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportNotifier.cs:Zeile 119 中的 RGiesecke.DllExport.DllExportNotifier.Notify(Int32 严重性,字符串代码,字符串消息,Object[] 值)。 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 中的 RGiesecke.DllExport.Parsing.IlAsm.RunLibTool(CpuPlatform cpu, String fileName, String directory)。 bei RGiesecke.DllExport.Parsing.IlAsm.RunCore(CpuPlatform cpu, String fileName, String ressourceParam, String ilSuffix) 在 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 186。 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 中的 RGiesecke.DllExport.Parsing.IlAsm.Run(String outputFile, String ilSuffix, CpuPlatform cpu)。 bei RGiesecke.DllExport.Parsing.IlAsm.ReassembleFile(String outputFile, String ilSuffix, CpuPlatform cpu) 在 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 75。 位于 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportWeaver.cs:Zeile 151 中的 RGiesecke.DllExport.DllExportWeaver.RunIlAsm(IlAsm ilAsm)。 d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportWeaver.cs:Zeile 81 中的 RGiesecke.DllExport.DllExportWeaver.Run()。 bei RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.Execute() in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:Zeile 243。

有人看过这个吗?有什么提示吗?

问候

【问题讨论】:

  • 在您的解决方案中右键单击 + 启用 nuget 包更新。因此,msbuild 将在最终构建器运行期间执行此操作

标签: c# build msbuild unmanaged finalbuilder


【解决方案1】:

我能想到的只是收集组件的 nugget 包未加载已在项目参考中更新,或者存在 CPU 架构 x86/x64 复杂性。

看起来您有 d:\Work\Libraries\ 和 C:\BuildSource\branches\ 目录的组合,并且您的项目文件中可能有意外链接,这些链接硬编码到不同的目录,而不是使用相对引用。查看 *.*proj 文件和提示路径。

有时我会在构建目录中打开 VS 解决方案并检查编译问题。 确保每次都使用干净的构建目录。尝试在非开发机器上运行 Finalbuilder 以查看构建它的效果。我发现我有很多隐式链接,因此我必须升级我的存储库以包含它们或在构建解决方案之前使用 Nugget 操作。

【讨论】:

  • 这有帮助吗?
  • 抱歉 Jamie,还没有时间尝试这个。
猜你喜欢
  • 1970-01-01
  • 2015-11-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-06-15
  • 2014-04-19
  • 2022-07-04
  • 2019-04-05
相关资源
最近更新 更多