Deployment issue with cab file

25 02 2008

While deploying a feature with a lot of files (200+; actually they are all the image files used in the project), I’ve used regular expressions to build the feature.xml and the element descriptor files. This is quite cool and you can actually build the files in a couple of minutes. But, as you don’t look at all the file names there are some issues that you will probably miss. In my case, I have built the WSP file with no sign of trouble. But when I was trying to deploy (stsadm -o add solution) I got the message “Failed to extract the cab file in the solution.”.

It seams that although the OS and all the WSP processing mechanism (WSPBuilder) allow, the deployment mechanism complains about special characters in the file names! After a thorough look, I found a file with a “+” in the name. 

Renamed the file, corrected all the references (deployment and usage) and it everything went OK.

If you get this king of message, my suggestion is to check all the file names. Look for special characters, language dependencies (i.e. çãõáéíóú…) in the file names included in the WSP.

Hope this helps.

Advertisements

Actions

Information

8 responses

2 07 2008
Larry Laffer

Hi,

I had exactly the same error message “Failed to extract the cab file in the solution” when trying to deploy my webpart with the stsadm command. After some trying I found out that I had a feature.xml file, while I’m just deploying a webpart. So I removed this feature.xml and it’s references in the manifest.xml now everything works as it should.

Larry Laffer

2 07 2008
ruimelo

Hi Larry,

I wouldn’t advise you to go this way. By removing the feature.xml file, you are actually removing the functionality that the solution is adding. Feature.xml is the file that describes the feature to be installed. If you remove it, there won’t be any feature installed and therefore you will not be able to activate it.

let me know if you need help on this.

16 07 2008
Mehul Jamod

Hi,

i got the same problem, in my wsp file come file having char “-” in the file name. should the problem is because of this char ? but this is required as it’s a culture name file so i can’t ignore it. Pls suggest me the solution

Thanks.
Mehul

16 07 2008
ruimelo

Hi Mehul,

I Haven’t come accross a problem with this char. Are you sure this is the only non-alphabetic char? If you want to take the doubt out the system, just rename the file that contains the “-” temporarily and test it. But my guts tell me that this is not the problem. how are you building the WSP? using DDF? When I get into this kinds of dilemma, usually the best solution is to prototype a very simple example. Although it takes some extra effort, it is typically faster than going round and round trying to find a solution. Let me know how it went!
Good luck.

6 11 2009
Francisco Lopez

It looks like file names cannot have (,{commas}) in addition to dashes.

I think a good rule of thumb is stay away, in your file naming, from any regular expressionish characters, if I may speak freely.

Underscores seem OK.

17 12 2009
ruimelo

Hi Francisco,

Thnaks for the input.
I agree with your rule. Keep file names as simple as possible.

Cheers,
Rui

18 02 2010
Alastair Brown

I had exactly the same error message “Failed to extract the cab file in the solution” In my case the problem was that I had the same file listed in feature.xml twice.

Hope that helps someone.

26 04 2011
ruimelo

Sorry for the delay.
Great input.
Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: