简体   繁体   中英

How can I build WSP files (SharePoint 2013 Web Part packages) with TeamCity

I am automating the build of a Sharepoint 2013 Web Part using TeamCity 9.1.4

The build runs fine and creates the DLL output.

How can I make TeamCity create WSP files (same output as clicking Deploy on Web Part project in Visual Studio)?

I am particularly interested in an experience of someone who set it up succesfully, I am aware of lots of articles mentioning using /t:Package argument for msbuild, and older posts mentioning WSPBuilder. I just cannot make it work in my TeamCity build.

Finally it works.

The flag to use for MSBuild.exe is /p:IsPackaging=true , you can enter it in the command line parameters of your TeamCity build step.

I added the following DLLs in the directory C:\\Program Files (x86)\\MSBuild\\14.0\\Bin:

  • 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

I found which DLL was missing by using the FusionLogs approach described by Scott Hanselman in this article

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM