AllWorkNoPlay
AllWorkNoPlay

Reputation: 454

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.

Upvotes: 1

Views: 1412

Answers (1)

AllWorkNoPlay
AllWorkNoPlay

Reputation: 454

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

Upvotes: 1

Related Questions