When I try to run a build through the TFS 2010 build service, I get errors stating that assemblies mentioned in the title can't be found, or rather, it breaks on a using
statement for the LongRunningOperationJob in the publishing assembly:
using Microsoft.Office.Server.UserProfiles;
and
using Microsoft.SharePoint.Publishing.Internal;
Also, underneath the errors there is the following warning:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1360): The primary reference "Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, 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 "Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
The project targets the .Net Framework 3.5 and has the platform target set to "Any CPU". I am using WSPBuilder, the mentioned Assemblies have the copy local flag set to false in the project.
I followed the steps mentioned here.