TFS Build 2010 - 自定义二进制位置和 SharePoint WSP
我正在使用 TFS Build 2010 构建一个解决方案。该解决方案有多个项目,其中一个项目是 SharePoint。
我希望 TFS Build 将每个项目的二进制文件放入其自己的文件夹中(即自定义的二进制文件夹)。因此,我按照 MSDN 的说明操作,结果成功了。
现在的挑战是我无法能够使用自定义的二进制文件夹生成 WSP 文件(请注意,我能够在没有自定义二进制文件夹的情况下生成 WSP) 。我收到此错误:
C:\\..\..\Microsoft.VisualStudio.SharePoint.targets (389): Unable to get the assembly for SharePoint Project Item "Layouts".
我认为 TFS Build/MSbuild 无法找到正确的程序集,因为我更改了“OutputPath”值以实现自定义的二进制文件夹。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须更新
Microsoft.VisualStudio.SharePoint.targets
文件。此文件位于生成服务器上的文件夹C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\
中。转到第 366 行:
将属性
OutDir="$(TeamBuildOutDir)"
更改为OutDir="$(TargetDir) "
并保存文件。我有一个博客 在此主题上发布并附有屏幕截图。
You are going to have to update the
Microsoft.VisualStudio.SharePoint.targets
file. This file is located in the folderC:\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)"
toOutDir="$(TargetDir)"
and save the file.I have a blog post on this topic with screenshots.