SharePoint error: “Cannot import Web Part”

前端 未结 11 1436
青春惊慌失措
青春惊慌失措 2021-02-08 02:33

I have a web part that I\'ve developed, and if I manually install the web part it is fine.

However when I have packaged the web part following the instructions on this w

11条回答
  •  花落未央
    2021-02-08 03:01

    Solved mine.

    i was getting this error:

    ===========================================================================
    Error importing WebPart. Cannot import ........ Web Part.
    Failed to add webpart 
    Exception Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Cannot import ... Web Part.     at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)     at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)     at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, SPWeb spWeb)     at Microsoft.SharePoint.WebPartPages.WebPartQuickAdd.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)   
    ===========================================================================
    

    "Cannot import webpart..."

    The problem was: Non-matching GUIDS

    Check if the guid on webpart class , and in the .xml and in .webpart class are same.

    I was copy-pasting code from other webparts sources. ( Mutliple Document Upload Wepart on Codeplex) and forgot to fix guids.

提交回复
热议问题