.net – 无法加载文件或程序集’PresentationFramework,Version = 3.0.0.0,Culture = neutral,

我正在研究
WPF应用程序,它首先针对3.0框架.当我试图让它在4.0上运行时,我得到了以下异常.

System.IO.FileNotFoundException was
unhandled Message: Could not load file
or assembly ‘PresentationFramework,
Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35’ or
one of its dependencies. The system
cannot find the file specified.

如果我使用.Net 4.0编译应用程序,它工作正常.但3.0 exes不适用于4.0.

提前致谢.

最佳答案 尝试删除Visual Studio项目中PresentationFramework的DLL引用,然后在Project Properties中重新定位应用程序框架,然后再次添加PresentationFramework引用.

点赞