Pages

Friday, July 10, 2015

Custom Web Part not showing in Web Part Gallery in SharePoint 2013

This happens when deploying solutions from Visual studio to SharePoint.

Follow these steps to solve this issue:
  1. Open the solution using Visual Studio and retract the solution.
  2. Open your site using browser and Go Site Settings > Web Parts and then remove your Custom WebPart from WebPart Gallery.
  3. Open the solution using Visual Studio and deploy the solution.
  4. After you deployed the solution you need to activate the Feature in SP. (This feature adds Web Part to the Web Part gallery). This will done for you automatically by the deployment tools in Visual Studio will do this for you when you deploy the solution in it but you need to check and activate it manually if it has not done.
Note: If you need your Custom WebPart to be save in custom category, you need to edit an attribute in WebPart Element file.

Open elements.xml using Visual Studio and modify it as following:

<Property Name="Group" Value="[Custom_Group_Name]" />

No comments:

Post a Comment