SharePoint Continuous Integration – The type or namespace name ‘xxx’ does not exist in the namespace ‘Microsoft.SharePoint’

There are multiple posts about setting up a SharePoint project building in a continuous integration server. One of the challenges assuming that SharePoint is not installed on the build server (as it shouldn’t) is to provide the necessary SharePoint assemblies for the build to happen. This is where out problems begun.

We decided to copy the libraries from 14ISAPI and keep them under source control for better portability. We could have installed them in the GAC witch would allow us to run multiple SharePoint project builds without having to provide all the necessary dlls all the time.

After getting all the assemblies and changing the references in the project to point our local versions we got several compilation errors building the project:

The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?

The type or namespace name 'Publishing' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

The type or namespace name 'Taxonomy' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

What stumped us is that we are including all those references. After spending an entire day trying different things we came across the problem. Publishing has a dependency on

System.Web.DataVisualization

Nothing on the error messages refer to this namespace. So After including the following library:

C:Program Files (x86)Microsoft Chart ControlsAssembliesSystem.Web.DataVisualization.dll

The project compiled as expected.

Leave a Reply

Your email address will not be published. Required fields are marked *