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.
UPDATE1: Thanks to Kai answer, solution was found. There was an error in my Feature.Template.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
<ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="Forms\*.xsn"/>
</Properties>
</Feature>
When I removed ReceiverAssembly element, all deploys succesfully.
UPDATE 2: But now I have got next question. When I deploy my solution, it deploys without errors, creates all lists , but I can't see my workflows. When I deploy it using VS2010 all works fine (workfows shown and associated with lists).
UPDATE 3: Actually, it doesn't work... when I remove ReceiverAssembly element it only deploys without error, but when I choose task (and InfoPath form have to start), it fails... When I change my ReceiverAssembly element how Kai shows, it deploys from VS, but not from WSP again...
UPDATE 4: Hurray! Now it works! Thanks to all!
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="UpdateItemTitleWF" Id="7e843b56-cec3-4eeb-8c89-8a746dbf723a" ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver" Scope="Site">