Saturday, August 30, 2008

Failed to extract the cab file in the solution error while deploying the .WSP file

I got a requirement to create a site definition from a site. I created a blank SharePoint site and applied all the customization required on top of the blank site,it involved mainly the SharePoint Designer customization, Master page changes and the customization related to List and document libraries.

Then i was using the SharePoint solution generator to create the soluction. It successfully created the solution and i was able to build the solution in Visual studio 2005. It didn't give any issue while creating the .wsp file too.

But the problem happened when i was trying to deploy the solution from visualStudio 2005 using the "Deploy solution" option. It failed and gave me an error Deploy failed: "Failed to extract the cab file in the solution"
I tried to add the solution using the stsadm.exe -o addsolution command but got the same result.

After some more investigation i found that the issue is becuase .wsp packages with the filenames containing special characters will give the mentioned error while adding the solution to the SharePoint solution store.

So, I verified my new site definition project files created by solution generator. As expected, it was because of a file i named it with special characters while customizing the site. I had named that file as Newform(backup).aspx that was the reason for the problem. I just renamed that file without special characters rebuilt the project again, then deployed the site definition using "deploy solution" option.

It worked fine.

No comments: