TFS Build 2010 - Custom Binary Location and SharePoint WSP

偶尔善良 提交于 2020-01-05 02:56:07

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/6274637/tfs-build-2010-custom-binary-location-and-sharepoint-wsp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!