【发布时间】:2013-04-17 10:13:42
【问题描述】:
我正在用 C# 创建一个库 TRSetup.dll。 该项目包括一些第三方dll。 (例如:GalaSoft.MvvmLight.Extras.WPF4.dll、GalaSoft.MvvmLight.WPF4.dll、RemObjects.Hydra.dll)
我需要合并所有的 dll 并创建一个 dll。
我正在使用 ilMerge 来组合 dll。 我正在使用以下命令,
ilMerge /out:MergedSetup.dll /targetplatform:v4,"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client"
/lib: TRSetup.dll Galasoft.MvvmLight.Extras.WPF4.dll Galasoft.MvvmLight.WPF4.dll RemObject.Hydra.dll
我可以创建一个名为 MergedSetup.dll 的 dll,但在运行时它会崩溃。 我该如何合并这些 dll。
提前谢谢你。
【问题讨论】:
-
什么时候“崩溃”?怎么了?有什么例外,代码示例?
-
TRSetupWindow 是一个 WPF 表单。当我调用 TRSetupWindow() 的构造函数时,它崩溃了。我尝试调试它,它给出了以下异常。
Could not load file or assembly 'TRSetup, Version=1.0.0.2228, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. -
TRSetup的构造函数有InitializeComponent(),它是初始化WPF GUI组件,它是自动生成的
标签: c# dll .net-assembly