【问题标题】:How can I build WSP files (SharePoint 2013 Web Part packages) with TeamCity如何使用 TeamCity 构建 WSP 文件(SharePoint 2013 Web 部件包)
【发布时间】:2016-05-13 04:46:07
【问题描述】:

我正在使用 TeamCity 9.1.4 自动构建 Sharepoint 2013 Web 部件

构建运行良好并创建 DLL 输出。

如何让 TeamCity 创建 WSP 文件(与在 Visual Studio 中单击 Deploy on Web Part 项目的输出相同)?

我对成功设置它的人的体验特别感兴趣,我知道很多文章提到使用 /t:Package 参数进行 msbuild,以及较早的文章提到 WSPBuilder。我只是无法让它在我的 TeamCity 构建中工作。

【问题讨论】:

  • 同时我发现我必须在 TeamCity 构建步骤“/p:IsPackaging=true”中添加命令行参数。现在添加必要的 DLL 并修复更多问题...
  • 现在我遇到以下错误:[ValidatePackage] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets( 450, 5):无法加载一种或多种请求的类型。检索 LoaderExceptions 属性以获取更多信息。我想我将不得不询问我自己的构建服务器并使用 Office 开发人员工具安装完整的 Visual Studio 2015 :(

标签: sharepoint msbuild teamcity wsp


【解决方案1】:

终于成功了。

用于 MSBuild.exe 的标志是 /p:IsPackaging=true,您可以在 TeamCity 构建步骤的命令行参数中输入它。

我在目录 C:\Program Files (x86)\MSBuild\14.0\Bin: 中添加了以下 DLL:

  • Microsoft.VisualStudio.SharePoint.ProjectExtensions.CodeGenerators.dll
  • Microsoft.VisualStudio.SharePoint.Remote.dll
  • Microsoft.VisualStudio.SharePoint.Wsp.dll
  • Microsoft.VisualStudio.SharePoint.dll
  • Microsoft.VisualStudio.SharePoint.Commands.Implementation.v5.dll
  • Microsoft.VisualStudio.SharePoint.Designers.Models.dll
  • Microsoft.VisualStudio.SharePoint.Designers.Models.Features.dll
  • Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.dll
  • Microsoft.Office.Sharepoint.Tools.dll

我使用 Scott Hanselman 在this article 中描述的 FusionLogs 方法发现缺少哪个 DLL

【讨论】:

    猜你喜欢
    • 2020-05-29
    • 2012-10-28
    • 2014-06-17
    • 2017-05-24
    • 2014-05-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多