Since I’ve re-installed .NET 4.0 Framework I need a direct reference to System.Web.DataVisualization in my SharePoint project which is referencing Nintex, Microsoft.Office.Server.UserProfiles and Microsoft.SharePoint.Taxonomy – other assemblies that are referencing System.Web.DataVisualization. Otherwise the following error is risen when compiling (FW.Common is a project assembly within my solution):
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 is in GAC and the code compiles fine on my collegue’s machine. I’m running Windows 7 64-bit, re-installed .NET 3.5 via control panel, re-installed MSChart.exe, re-installed SharePoint 2010 SDK but compiling on my machine works only when referencing System.Web.DataVisualization direclty in every project in our solution. I would like to avoid the reference, since all other collegues do not need to have the reference to compile the solution successfully.
Thanks for your help in advance!
Cheers
As posted in my comment of ironman99’s answer above, manually adding the references resolved the issue. Lately I had to re-install my SharePoint dev machine and of course the problem went completely away. I guess the build target definitions of the .NET Framework somehow messed up…