SPSF breaks TFS Online / CI build


Once added to a project, SPSF breaks CI/TFSOnline build with the following outcome:

C:\a\src\SPSF.targets (125): The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Build.Tasks.v4.0.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Build.Tasks.v4.0.dll' or one of its dependencies. The system cannot find the file specified.

What might be a recommended way to solve it, and what are the suggestions on CI/TFSOnline?


matein78 wrote Sep 17, 2015 at 8:01 PM

Hi Anton, looks like your build configuration for the project(s) is set to amd6. Any reason for that? Obviously your build controller does not include MSBuild Tasks for that. Those are usually available on any TFS / VSO build system and a quick test showed that it works fine for a sample project of min with the Hosted Build controller in VSO.

The SPSF.targets is actually just an MSBuild task that collects the WSPs from all farm solution projects into the deployment project for SharePoint Solution Deployer (spsd.codeplex.com) .
So it does not use anything out of the ordinary apart from tasks to find and copy files and folders.

If you have a custom build controller attached to TFS Online (VSO) then check if the tasks are available for this build configuration. If not it might require Visual Studio to be installed. On the Hosted Build Controller you could add that task dll (assuming it has no other dependencies) to your source control and reference it from there instead.

Let us know if you could solve the issue.