Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Error occurred in deployment step 'Add Solution': Index (zero based) must be greater than or equal to zero and less than the size of the argument.

Getting this error on deployment both from CA and VS. Any ideas on what might cause this?

More detailed exception:

System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.EnsureSolutionPackage()
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.DeployLocalCore(Boolean globalInstallWPPackDlls, Collection1 webApplications, Boolean useAdminService, Boolean force, Boolean checkIfDeployed)
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.DeployLocal(Boolean globalInstallWPPackDlls, Collection
1 webApplications, Boolean force)
at Microsoft.SharePoint.ApplicationPages.SolutionPageBase.CreateDeploymentJob(Boolean deploy, String strSelectedWeb, Boolean globalInstall, DateTime dt, Boolean localDeployment)
at Microsoft.SharePoint.ApplicationPages.DeploySolutionPage.BtnSubmit_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

share|improve this question
    
Does this occur with any wsp file? –  Andrey Markeev Jan 23 '12 at 16:50
    
It only occurs with one WSP file. –  HaavardMeling Jan 24 '12 at 7:42
1  
then, you should check your manifest.xml which is inside wsp. probably comparing manifest.xml with one from a working wsp will help to spot some property which is missing or corrupted or smth like this –  Andrey Markeev Jan 24 '12 at 7:50
add comment

1 Answer 1

up vote 1 down vote accepted

It was fixed by ensuring that all solution dependencies were deployed. The exception is thrown when SharePoint tries to resolve the resource file for the error message that dependencies are missing. Probably a bug or maybe an update gone wrong with resource files in SharePoint.

Statement that fails in SharePoint:

string.Format(CultureInfo.InvariantCulture, SPResource.GetString("ActivationSolutionDependencyXXXX", new object[0]), new object[0]);

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.