title: Error deploying SharePoint 2010 solution with InfoPath form (The path is not of a legal form.)
body: <p>I am new to SharePoint and .Net development, sorry if answer for my question is obvious.</p>
  
  <p>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:</p>
  
  <pre><code>[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.&lt;&gt;c__DisplayClass1.&lt;AddOrUpgrade&gt;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
  </code></pre>
  
  <p>My module Elements.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
    &lt;Module Name="Forms"&gt;
      &lt;File Path="Forms\CustomTaskForm1.xsn" Url="Forms/CustomTaskForm1.xsn" /&gt;
      &lt;File Path="Forms\CustomTaskForm0.xsn" Url="Forms/CustomTaskForm0.xsn" /&gt;
      &lt;File Path="Forms\CustomTaskForm7.xsn" Url="Forms/CustomTaskForm7.xsn" /&gt;
      &lt;File Path="Forms\ApproveTaskForm.xsn" Url="Forms/ApproveTaskForm.xsn" /&gt;
    &lt;/Module&gt;
  &lt;/Elements&gt;
  </code></pre>
  
  <p>There is an answer to the problem <a href="http://social.technet.microsoft.com/Forums/en-NZ/sharepoint2010customization/thread/d648be5c-8613-494f-a7f0-9f7763710411" rel="nofollow">here</a>, 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?</p>
  
  <p>Thank you in advance.</p>