2

I'm building a solution using TFS Build 2010. This solution has multiple projects and one of the projects is SharePoint.

I want TFS Build to put binaries for each project in its own folder (i.e. customized binary folder). So I followed the instructions from MSDN and it works.

Now the challenge is that I'm not able to generate a WSP file with the customized binary folder (note that I'm able to generate WSP without the customized binary folder). I'm getting this error:

C:\\..\..\Microsoft.VisualStudio.SharePoint.targets (389): Unable to get the assembly for SharePoint Project Item "Layouts".

I think TFS Build/MSbuild is not able to locate the correct assembly because I changed the "OutputPath" value to achieve customized binary folders.

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
UniK
  • 21
  • 3
  • Can you be more specific about why you need to change the binary location of the projects? What would be wrong with leaving the default locations? – John Saunders Aug 07 '11 at 19:37

1 Answers1

3

You are going to have to update the Microsoft.VisualStudio.SharePoint.targets file. This file is located in the folder C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\ on the build server.

Go to line number 366: <CreateSharePointProjectService Configuration=...

Change the attribute OutDir="$(TeamBuildOutDir)" to OutDir="$(TargetDir)" and save the file.

I have a blog post on this topic with screenshots.

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
  • I have the same issue that the OP states. I followed your guidelines here and on your blog post. I'm still not getting this to work. My error is now: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets (411): Method not found: 'Boolean Microsoft.VisualStudio.SharePoint.PathUtils.HasIllegalDeploymentPathCharacters(System.String)'. Any ideas? – Mike G May 25 '12 at 13:41
  • Please refer to the following [link] (http://stackoverflow.com/questions/10755609/tfs-2010-building-sharepoint-2010-solution-with-custom-outputs) – Wes MacDonald May 30 '12 at 17:38