今天在重新编译我的WPF项目时,Visual Studio 2008 突然崩溃,没有任何警告或是异常,窗口直接消失。
接下来用WinDbg调试时发现如下错误:
CLR: (C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__b03f5f7f11d50a3a/PresentationFramework.dll) Rejecting native image because dependency C:/Windows/assembly/GAC_MSIL/WindowsBase/3.5.0.0__b77a5c561934e089/WindowsBase.dll is not native.
看上去是Gac里的文件被破坏了,然后就将PresentationFramework.dll重新安装到Gac里,问题不再出现。
将其纪录在这里,以免以后再碰到类似的情形。