我的项目设置为 .NET Framework 4.5。尝试在我的 WPF 项目中使用 SimpleIOC(来自 MVVM Light)时出现以下错误:
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
在没有编译器抱怨的情况下编写。是否存在某种版本问题?