我目前正在使用 TeeChart Lite(teechart 的免费版本)。我想在我的 WPF 项目中使用它,但是可下载的免费版本仅适用于 .NET 2.0,因此我收到以下错误:
Warning 1 The referenced assembly "TeeChart.Lite" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
仅添加程序集 System.Design,版本 4.0.0.0 是否安全,即使它不是目标框架的一部分?或者我可以做些什么来让它在 .NET 4.0 中工作?
请您参考如下方法:
我没有可供测试的 Visual Studio,但这可能是以下两种情况之一:
更有可能的是,您只需要引用 System.Design.dll,which is a standalone DLL .
不太可能:如错误消息所述,您的目标是 4.0 客户端框架,这是 VS2010 中新项目的默认设置。转到您的项目属性并引用完整 4.0 框架,这可能会解决问题。
实际的解决方案可能需要结合这两个步骤。
