我的项目设置为.NET Framework4.5。在我的WPF项目中尝试使用SimpleIOC (来自MVVM )时,我得到了以下错误:
Error 3 Reference required to assembly 'System.ComponentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' containing the implemented interface 'System.IServiceProvider'. Add one to your project.
我搞不懂为什么会有这个错误。据我所知,这是一个mscorlib类,所以我不确定它从哪里获得System.ComponentModel。
我可以在没有编译器抱怨的情况下编写Dim test As IServiceProvider。有什么版本问题吗?
发布于 2014-12-19 03:02:16
这似乎是一个可能的Visual错误。我创建了一个新的WPF项目,并能够在System.ComponentModel.dll框架程序集列表中找到.Net。对于我的当前项目,我最终浏览到它以添加对它的引用。现在一切都好了。
https://stackoverflow.com/questions/27558793
复制相似问题