由于 MahApps.Metro,我很难使用 SmartAssembly 6(评估/试用)将我的 C# WPF 项目中的所有依赖项捆绑到一个 exe 中。
这个结论是在创建一个只有 MahApps.Metro 的完全空的项目时得出的,并且仍然无法捆绑它。
它抛出带有内部异常的异常System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
我花了一天半的时间试图解决这个问题,谷歌搜索错误,尝试我能找到的每一个建议,并在官方 MahApps.Metro 聊天中发布 ( https://gitter.im/MahApps/MahApps.Metro )。我尝试了各种变体,其中我删除了 System.Windows.Interactivity dll,添加了它,将它移动到另一个路径等。
使用来自 NuGet 的最新 MahApps.Metro 包和 .NET 4.5。当我从 Visual Studio 2012 运行该程序或从 Debug/Release 运行应用程序时,该程序可以工作。
有没有人遇到过这个问题?你是怎么解决的?问题是捆绑应用程序(SmartAssembly 6)还是 MahApps.Metro?您知道或认为是否有任何其他捆绑程序可以与 MahApps.Metro 一起使用?