SharePoint error: “Cannot import Web Part”

前端 未结 11 1421
青春惊慌失措
青春惊慌失措 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 02:55

    Figured it out.

    The error message is the one from the .webpart file:

    
    
      
        
          
          
          Cannot import Project Filter.
        
        
          
            Project Filter
            Provides a list of Projects that can be used to Filter other Web Parts.
          
        
      
    
    

    The problem is that the original .webpart file was created on a 32-bit system with Visual Studio Extensions for WSS installed.

    However as I'm now on a 64-bit machine VSEWSS is unavailable, and I believe that results in the above GUID not being substituted as I am not using those deployment tools.

    Replacing the GUID with the full type name works.

    So if you encounter the error message from your importErrorMessage node, then check that your type node in the .webpart file looks more like this (unrelated example):

    
    

    This is in the format: Class, Namespace, Version, Culture, PublicKey

    You can grab that easily from the web.config file associated with your SharePoint instance, as it will be in the safe controls list.

提交回复
热议问题