How to Create a Sharpeoint WSP Solution Files on Team Foundation Server

How to Create a Sharpeoint WSP Solution Files on Team Foundation Server

Often enterprises have source code control and you are requires to work with the source code server to build the Sharpeoint WSP solution file directly on the source control server. Here are some sample on how to create Sharepoint WSP solution files with a Team Foundation Server:

What you need:

  • Visual Studio
  • makecab.exe uploaded to the individual VS project (if you have several VS project, you will need a copy of makecab.exe for each of your project
  • Basic WSP solution deployment files: Manifest.xml, Feature.xml, elements.xml

Within your Project File’s Post Build Event:

cd $(ProjectDir)
makecab /F test.ddf
copy “$(Projectdir)*.wsp” “$(OutDir)”

Using text editor, create a file call test.dff. Here is a sample test.dff:

.OPTION Explicit
.Set DiskDirectoryTemplate=CDROM
.Set CompressionType=MSZIP
.Set UniqueFiles=Off
.Set Cabinet=On
.Set DiskDirectory1=”.”
.Set CabinetNameTemplate=”test.wsp”
;*****************************************************
Manifest.xml
“E:\TFS Local Build Folder\test.dll”

TestSolution_Picture.gif

.Set DestinationDir= TestSolution
Template\Features\TestSolution\Feature.xml
Template\Features\ TestSolution\elements.xml

.Set DestinationDir=Layouts\TestSolution_LocalSystemFile
Template\Layouts\TestSolution\TestSolution_LocalSystemFile.aspx