当前位置: 动力学知识库 > 问答 > 编程问答 >

msbuild - TFS Build 2010 - Custom Binary Location and SharePoint WSP

问题描述:

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.

网友答案:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: