SharePoint: "Failed to extract the cab file in the solution" - sharepoint

I'm receiving a "Failed to extract the cab file in the solution" error when I try to deploy my wsp using stsadm -o addsolution -filename...
I've open the wsp as a cab and checked that there are no duplicate files in there as I understand that can sometimes cause this issue.
The issue only started when I tried to include a custom field type as part of my solution, to do this I added the following to the ddf
..\CustomFields\ShortMonth\ShortMonthControl.ascx ..\CONTROLTEMPLATES\ShortMonthControl.ascx
..\CustomFields\ShortMonth\fldtypes_shortmonth.xml ..\XML\fldtypes_shortmonth.xml
and
<TemplateFiles>
<TemplateFile Location="CONTROLTEMPLATES\ShortMonthControl.ascx"/>
<TemplateFile Location="XML\fldtypes_shortmonth.xml"/>
</TemplateFiles>
to the manifest.
I've tried taking it back to just references to the ascx in both but it doesn't see to help.
Any ideas?

Check that you don't have any special characters in your files. They might have sneaked in as a result of copy-paste. For example, the way your code sample renders on this page, it has the (`), which shouldn't be there.

Do you need the "..\" in your DDF?

The issue is more likely due to invalid names for files you are deploying on SharePoint 14 hive folder. If you are using parenthesis ‘(‘, ‘)’ in file names or special characters like # in file names, this issue will occur.
Remove it and issue should vanish.

I just know I have had the same issues and I think I made a note of it at work somewhere (I´ll check that tomorrow and post back here if I find something). I just can´t remember how I fixed it right now (maybe it was a slash the wrong way / vs. \..hmm).
I did a search for it on google (which I think you have also done). Found this (check it out):
http://www.codeplex.com/wspbuilder/WorkItem/View.aspx?WorkItemId=7385

The List Instance Name I had was "MyListInstance (List Instance)". I removed the brackets from the name and it deployed without issues.

Check the .ddf file for a line that could have been accidentally duplicated. Apparently sharepoint doesn't like that!

A reboot solved my 'Failed to extract cab file' problem. There were some updates installed and an reboot was required. Was not clear that this was related but it helped.

Something would have gone wrong during the build of WSP.
Re build the WSP and Deploy- it should work fine.

Related

Retrieve contents of a ZIP file on SharePoint without downloading it

I have written a bit of automated code that checks a SharePoint site and looks for a ZIP file (lets call it doc.zip). If doc.zip is found, it downloads it, and then checks for a file (say target.docx). doc.zip is about 300MB, and so I want to only download where necessary.
What I would like to know is that given SharePoint has some ZIP search capability, is it possible to write code using CSOM (c#) to find doc.zip, and then run some code to retrieve the contents of doc.zip without downloading it.
Just to re-iterate, I am comfortable with searching for files in a folder on SP, downloading the file, and unpacking zip entries. What I need is to retrieve a ZIP files content on SP without downloading it.
E.g. is there a SP command:
cxt.Load(SomeZipFileQuery);
cxt.ExecuteQuery();
Thanks in advance.
This capability is not available. I do like the idea. Having the ability to "parse" zip files on the server side and then download the relevant bits would be ideal. Perhaps raise this on uservoice to see if others also find this us https://sharepoint.uservoice.com
Ok, I have proven yet again that stubbornness will prevail.
I have figured out that if I use the /_api/search?query='myfile.zip' web REST API to search for my file, this search will also match ZIP files that contain the file I need. And it works perfectly.
Of course there is added (pain) of parsing an XML response, but it works very nicely for my code example.
At least if someone is looking for this solution here it is. I wont bore anyone with code, as the /_api/search has probably been done to death already on other threads.

Is it possible to edit an Acumatica company snapshot XML?

It seems that one of the advantages to being able to export a snapshot in XML format is the ability to compare and merge changes between environments.
However, when I try to do this, zip the XML files again, and Import them, I get an error "Invalid snapshot format"
Is there a method to do what I'm trying to do?
Thank you all for the advice! The problem was indeed that I was zipping the extracted folder rather than just the contents. Doh!

Anybody has any ideas what exactly spWeb.Features.Add does?

anybody know what exactly below code does?
SPWeb.Features.Add(Guid, bool)
Does it use the .xmls in Template\Features\<-myFeature-> to install the feature and activate it? Or just activate it? Or something else?
Thanks!
The method you specified activates feature with specified id on specified SPWeb object. It does not install it. Here is MSDN link.
It actually uses xml files in "Template\Features\<-myFeature->" folder when you activate feature.
But if you change file in this folder you won't see any effect momentary because this files are cached. After changing files in feature folder you need to do iisreset and then activate feature in order to see the difference.

Subsonic 3 not generating classes

I followed the 3 step procedure 20 times on 3 different sytems under all possible conditions and no matter what I do it won't generate the classes. I keep getting the following error:
Loading the include file 'SQLServer.ttinclude' returned a null or
empty string. The transformation will not be run.
Any ideas?
I have tried all the solution I found on google but no luck. So I decided to dig into this issue. As you can see, the error tell that generator can not load the include file "SQLServer.ttinclude" although the include file exists. If it can not read include file, why don't we include content of SQLServer.ttinclude instead of including file ?
Copy content of SQLServer.ttinclude to all *.tt as below steps:
Make sure that you have follow this instruction on Subsonic homepage first [link text][1]
[1]: http://subsonicproject.com/docs/Using_ActiveRecord
For each .tt file:
Delete <## include file="SQLServer.ttinclude" #>
Copy and paste content of SQLServer.ttinclude to the end of .tt files
Right click on .tt files -> Run custom tool. The *.cs files will be generated. Compile now !!!!
A little funny thing that I've noticed: After doing above steps and get *.cs file generated. You can simply copy and paste template files again into your solution explorer exact the instruction in [link text][1] and the *.cs file generated without doing any tricks !!!
Hope this helps.
Hai
Try adding the .tt and .ttinclude files to the VS project via Right click -> Add -> Existing Item, rather than dragging the files into VS. Seemed to make the difference for me.
Check the rights associated with the credentials used to authenticate access to the database. You need dbo access for the entity classes to be generated.

Use of nlog.xml

I just started playing with nlog, and noticed that nlog.xml file is brought along with nlog.dll into the output folder of the application. It's not too clear for me what that file is needed for and whether i should carry it over as a part of my app install or can safely remove it. Any ideas?
Thanks,
Andrey
Yes, you can remove it from the output. The XML file contains the nlog data for the intellisense.

Resources