突然间,我在 WPF 项目中遇到了这个神秘的 FileNotFoundException 异常。它发生在我的 Window 构造函数的 InitializeComponent 中:
Could not load file or assembly 'PresentationFramework.Eren Vista, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
我搜索了PresentationFramework.Eren Vista,但我找不到任何有关它的信息。你们有人知道这到底是什么吗?
更新:这似乎是一个主题(例如PresentationFramework.Aero、PresentationFramework.Classic、PresentationFramework.Luna em>、PresentationFramework.Royal),但我没有在应用程序的任何地方引用此主题。
最佳答案
将 Win7 主题更改为自定义主题后,我遇到了类似的问题:
Could not load file or assembly 'PresentationFramework.Win7-Shine2.0, ...
我通过删除 Visual Studio 解决方案的 .suo 文件并重新加载解决方案解决了这个问题。
似乎 .suo 文件存储了一些 Windows 主题设置,导致当您更改主题并尝试重建解决方案时出现错误......很奇怪。
关于.net - 神秘的WPF异常: 'PresentationFramework.Eren Vista' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1389607/