Modifying WSP Files Directly / Manually


Here’s a common issue: You export a site as a template, save down your WSP file, browse out to your client environment and prepare to upload your WSP but you receive an error that looks something like this:

After some hunting you come to find out that your source environment had Project Server installed and your destination environment does not. This same scenario can happen all over the place. Consider going from an Enterprise environment to a Standard environment or from on premise to Office 365.

So how do you fix this?

Extract the WSP

  1. Download a tool like 7-Zip.
  2. Right click the file
  3. Select 7-Zip > Extract to WspName
  4. Go ahead and go into the folders and edit any XML that you may need to. Using the example above you will need to edit the onet.xml file to remove the site collection feature reference.

Build the Directive File

  1. Download makeddf and drop the makeddf.exe in the same directory as your extracted folder
  2. Open command prompt
  3. Change directory to the location of makeddf
  4. Run the following command
    makeddf /p WspName /d WspName.ddf /c

Remake the Cab

  1. Copy the newly created ddf file into your WspName folder
  2. Go back to your command prompt
  3. Change directory into the WspName folder
  4. Run the following command
    makecab /f WspName.ddf
  5. Rename your newly created cab file to WspName.wsp and you’re done

Hope that helps!

I'm a public speaker and the Chief SharePoint Architect for Eastridge, a Microsoft Gold Partner specializing in SharePoint and custom application development in Winston-Salem, NC. I focus on the SharePoint platform with a specialty in Information Architecture, Publishing and Best Practices.

Got something to say? Go for it!