我是SharePoint和.Net开发的新手,很抱歉,如果对我的问题的回答很明显。
我创建了使用InfoPath表单的SharePoint解决方案。当我从Visual Studio部署它时,一切正常,但是当我尝试从Web界面部署WSP包时,它会失败并显示错误:
[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
我的模块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>
问题here有一个答案,它告诉我发生了错误,然后Path attrubute不正确,但是我无法理解当前的目录以及如何更改Path属性。你能帮帮我吗?
提前谢谢。
答案 0 :(得分:0)
我找到了答案。现在它有效。似乎问题的根源是next: 我已经尝试将WSP Farm解决方案添加到沙箱解决方案库中。我必须使用另一种方式进行部署,例如PowerShell。