重命名程序集,应用程序将无法构建

时间:2014-01-04 12:23:58

标签: c# wpf xaml

我将我的WPF应用程序的程序集从DBce_TEST2重命名为AMS,然后尝试构建它以查看会发生什么。我运行它,它不会出于明显的原因而构建,但现在将它重命名为DBce_TEST2后,我收到以下错误:

Managed Debugging Assistant 'BindingFailure' has detected a problem in 'G:\C# Projects\Asset Management System\DBce_TEST2\bin\Debug\DBce_TEST2.vshost.exe'.

Additional Information: The assembly with display name 'AMS' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'AMS' or one of its dependencies. The system cannot find the file specified.

2 个答案:

答案 0 :(得分:0)

错误很可疑。使用Fusion日志查看器可以了解出现了什么问题。

How to enable assembly bind failure logging (Fusion) in .NET

答案 1 :(得分:0)

想出来。将程序集重命名为一些随机文本,尝试运行它,然后重命名回原始程序集名称,错误消失。猜猜一些生成的文件被视觉工作室搞砸了一点,这就解决了。