2

I created a simple WebPart in Visual Studio 2010 that I was using to test some functionality for a project. When the WebPart was built and deployed, the messages in the Output box in VS all state that it was deployed successfully. In SharePoint Central Administration, under System Settings -> Farm Solutions, it shows that the WebPart was deployed. However, if I created a WebPart page and try to add that WebPart, it doesn't show up in the Custom Category. Also, it doesn't show up in server_name/sites/site_name/_catalogs/wp/Forms/AllItems.aspx.

Please explain to me what is going on why the WebPart only seems to be "partly deployed", and please suggest a way to solve this issue.

Thank you all in advance for your help and advice!

2
  • Do you have installed any plugin for Visual Studio? is that by any chance a shared pc? Do the solution contain any feature? And can you post a screenshot of the Solution Explorer with the web part project nodes expanded? I would like to see how the solution is structured before shooting in the dark. Commented Mar 7, 2013 at 9:18
  • did you find a solution to this? Commented Aug 26, 2015 at 18:55

2 Answers 2

3

Your solution will have a "Feature" in it that will be scoped to "Site" (Site Collection) or "Web" (regular site). You will have to go into Site Settings -> Manage Site Collection Features/Manage Site Features -> Activate your feature.

3
  • I checked Site collection features and it was already activated. Situation is otherwise still the same.
    – rx3r0
    Commented Mar 6, 2013 at 22:02
  • Deactivate the feature and activate it again. If its still not there, go to the web part gallery, click Populate Gallery and add your web part. Check ULSViewer when you deploy as well to see what's happening.
    – Fox
    Commented Mar 7, 2013 at 13:47
  • @Fox : I am facing the same problem. When i deploy the solution on DEV environment it works perfectly. But on Other(PRODUCTION) environment i do not find the web part from my installed solution. I have confirmed that Web part is added in the feature. My package also contains the web part. I have checked the feature for this web part and it is already activated but i do not find web part in web part gallery. could you please let me know if there is settings that i need to check? Thanks in advance Commented Jun 15, 2016 at 11:27
3

Once the solution is deployed, you need to add WebPart to gallery to use it on a SharePoint page.

Here's a article that provides step by step guide to add webpart to gallery after deploying it as a solution.

http://www.codeproject.com/Articles/33864/Deploying-a-Custom-WebPart-to-Sharepoint

Or

http://technet.microsoft.com/en-us/library/cc261736(v=office.14).aspx#BKMK_AddWebGallery

Note:

Follow steps provided by andrew, only if you developed your webpart as a feature as some webparts can be developed as solutions without being a feature.

5
  • TimeToShine, I belive that the presence of a file in the web part gallery only indicates that someone/something has deployed a configuration template for the web part to the gallery. No need for the web part to be actually used. The other note still stand, you can create a wp programmatically and that wouldn't require a feature or a .webpart file in the gallery. Commented Mar 7, 2013 at 9:24
  • @SPArchaeologist on SharePoint 2007, you won't be able to find a webpart in list(to add it to a page) unless you populate it in webpart gallery, I am pretty sure it works same way in SP 2010, can you provide any reference please :) Commented Mar 7, 2013 at 9:27
  • wait. Are you saying that "A web part won't appear in the add web part menu if there isn't a template in the web part gallery" (aka "server_name/sites/site_name/_catalogs/wp/Forms/AllItems.aspx") or "A web part template won't appear in the gallery if the web part has not been added to a page"? Because your comment seem to indicate the first (which is the correct one AFAIK) but the wording in your answer seems to indicate the later "A Webpart only shows up in server_name/sites/site_name/_catalogs/wp/Forms/AllItems.aspx(==web part gallery) when it's added to page". Commented Mar 7, 2013 at 9:39
  • @SPArchaeologist you are right, I mixed up "?Contents=1" with "server_name/sites/site_name/_catalogs/wp/Forms/AllItems.aspx(==web part gallery)" Thanks for correcting me. Commented Mar 7, 2013 at 12:43
  • 3
    Don't worry - my pleasure. Commented Mar 7, 2013 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.