由于我重新安装了 .NET 4.0 Framework,我需要在我的 SharePoint 项目中直接引用 System.Web.DataVisualization,该项目引用 Nintex、Microsoft.Office.Server.UserProfiles 和 Microsoft.SharePoint.Taxonomy - 其他引用的程序集System.Web.DataVisualization。否则编译时会出现以下错误(FW.Common 是我解决方案中的项目程序集):
warning MSB3268: The primary reference "FW.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1e89ea7ddbf0abdc, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5". To resolve this problem, either remove the reference "FW.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1e89ea7ddbf0abdc, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
System.Web.DataVisualization 在 GAC 中,代码在我同事的机器上编译得很好。我正在运行 Windows 7 64 位,通过控制面板重新安装了 .NET 3.5,重新安装了 MSChart.exe,重新安装了 SharePoint 2010 SDK,但在我的机器上编译只能在每个目录中直接引用 System.Web.DataVisualization我们的解决方案中的项目。我想避免引用,因为所有其他同事都不需要引用来成功编译解决方案。
提前感谢您的帮助!
干杯