<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="ListTemplate"> <File Path="ListTemplate/abc.stp" Url="ListTemplate/abc.stp" IgnoreIfAlreadyExists="FALSE" Level="Published" ReplaceContent="TRUE" Type="Ghostable"> <Property Name="Title" Value="ImportExcelWithRemarks" /> <Property Name="LanguageDisplay" Value="English" /> <Property Name="Version" Value="4" /> </File> </Module> </Elements>
url 里的那个路径使用\ 符号会报错。
Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: The file or folder name contains characters that are not permitted. Please use a different name. ---> System.Runtime.InteropServices.COMException: The file or folder name contains characters that are not permitted. Please use a different name. at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext) at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext) -
另外一个错误 ‘Failed to instantiate file from module: The specified list dost not exist.’
Try changing type ='GhostableInLibrary' to Type ='Ghostable' in the elements.xml.
after this . it can be deployed successfully.

浙公网安备 33010602011771号