5

I am trying to setup the build integration between tfs and sharepoint.

We have a separate build server. We have followed these steps and checked them for correctness 3 times. However on sharepoint builds, we keep having this error. And yes the files exists on the build server.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Models, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

Please advice.

Update 1: 1. When I remove the .SLN from the build definition and add the csproj one by one, the build completes but I get this warning for each project (10 times) C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (610): The OutputPath property is not set for project 'Pwc.SP.DMS.CLF.CustomContentField.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='Any CPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project

I set /p:IsPackaging=true however in the drop folder I only see log files, there are no wsps or dlls.

If I remove the csproj and add the .sln then I get this error again:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Models, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
  • What path does the file exist at, and are you sure it's version 11.0.0.0 that you have on your build server? – Dylan Smith Feb 21 '14 at 16:06
  • it exists in the same path, actually I copied it from the dev server to the build server – Luis Valencia Feb 21 '14 at 16:55
  • 1
    the same path as what? I'm talking about the Microsoft.VisualStudio.SharePoint.Designers.Models.dll that it is looking for (not the targets file) – Dylan Smith Feb 21 '14 at 17:06

1 Answers1

2

If you copied the assembly to the build server, you may not have copied all the assemblies that Microsoft.VisualStudio.SharePoint.Designers.Models depends on. I would use Reflector or some kind of disassembler to view the dependencies. Once you have them all there, you should stop seeing loading issues. Sometimes, the issue relates to the architecture of the process running on the build server.

I would manually build the solution or project using msbuild on the build server i.e.

msbuild a.sln /p:OutDir=e:\dir\ /p:Configuration=Release /p:Platform="Any CPU"

msbuild a.csproj /p:OutDir=e:\dir\ /p:Configuration=Release /p:Platform=AnyCPU