简体   繁体   中英

Error deploying SharePoint 2010 solution with InfoPath form (The path is not of a legal form.)

I am new to SharePoint and .Net development, sorry if answer for my question is obvious.

I've created SharePoint solution, which uses InfoPath form. When I deploy it from Visual Studio, all work fine, but when I try to deploy WSP package from web interface it fails with error:

[ArgumentException: The path is not of a legal form.]
System.IO.Path.NormalizePathFast(String path, Boolean fullCheck) +3806
System.IO.DirectoryInfo..ctor(String path) +245       
Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver.EnumerateFormTemplates(SPFeatureDefinition featureDef) +156
Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver.FeatureInstalled(SPFeatureReceiverProperties properties) +789
Microsoft.SharePoint.Administration.SPFeatureDefinition.DoInstallationCallout(SPSite site, String solutionHash, Boolean fInstall) +27309665
Microsoft.SharePoint.Administration.SPFeatureDefinition.Install(SPSite site, String solutionHash) +444
Microsoft.SharePoint.Administration.SPFeatureDefinitionCollection.AddCore(SPFeatureDefinition featdef, SPSite site, String solutionHash, Boolean fForce, Boolean fDoValidation) +26381365
Microsoft.SharePoint.Administration.SPFeatureDefinitionCollection.AddInternal(String relativePathToFeatureManifest, Guid solutionId, String solutionHash, SPSite site, Boolean force, Boolean fDoValidation, SPFeatureDefinitionContext featureDefinitionContext) +174
Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureDefinitions(SPFeatureDefinitionCollection featColl, SPFeatureDefinitionContext context, Boolean force, Boolean activateFeatures, SPSite site, SPWeb web) +290
Microsoft.SharePoint.Administration.SPUserCodeSolutionPackage.EnableSiteCollectionSolution(SPSite site, Int32 solutionGalleryItemId, Boolean force) +23867323
Microsoft.SharePoint.<>c__DisplayClass1.<AddOrUpgrade>b__0() +4075
Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) +27948246
Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution) +449
Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId) +574
Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem() +398
Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +72
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

My module Elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Forms">
    <File Path="Forms\CustomTaskForm1.xsn" Url="Forms/CustomTaskForm1.xsn" />
    <File Path="Forms\CustomTaskForm0.xsn" Url="Forms/CustomTaskForm0.xsn" />
    <File Path="Forms\CustomTaskForm7.xsn" Url="Forms/CustomTaskForm7.xsn" />
    <File Path="Forms\ApproveTaskForm.xsn" Url="Forms/ApproveTaskForm.xsn" />
  </Module>
</Elements>

There is an answer to the problem here , which tells that the error occurs then Path attrubute is incorrect, but I can't understand what directory is current and how I have to change the Path attribute. Could you help me, please?

Thank you in advance.

I've found the answer. Now it works. It seems like the root of the problem is next : I've tryed to add WSP Farm solution to sandbox solution gallery. I have to use another way for deploying, for example PowerShell.

PS: Thanks to Balamurugan-S KAUST answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM