SharePoint error: “Cannot import Web Part”

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

    I have seen this anomaly several times without a good resolution.

    Check that your Assembly, Namespace, Class name is correct EVERYWHERE. This has hung me up more than once.

    Make sure you have a valid SafeControls entry.

    Make sure your .webpart file is valid (let SharePoint create it for you if you can)

    If you are absolutely positive that everything is correct, well then you are stuck in a place that I have been several times. The only thing that I can come up with is that VS is compiling the assembly wrong. The ONLY fix that I have found is to create a new VS project and set it up how you need, then copy THE TEXT of your old CS files into your new CS files...do not copy the files themselves...the goal is to have everything fresh.

    This has worked for me. Good Luck.

提交回复
热议问题