Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a visual web part using Visual studio 2010. I want to deploy that Visual web part in another site using .wsp file created by building the solution in Visual studio 2010. I have successfully added the solution using Powershell -addsolution command. But I couldn't find the webpart I developed so that I can add that webpart in a page in the site where I have added solution using .wsp file. Please suggest me the solution.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You said you have already deployed you solution to the target web application. Whilst this may be enough to ensure to deploy the solution assemblies to the gac (assuming that you are using the gac), this won't actually display the web part in the Web Part Gallery.

You see - while as long as SharePoint is able to find an assembly that contains your wp you are free to add whichever web part you want VIA CODE to a page, the Web Part Gallery is actually based on a list (you can find in in your site collection settings page). Inside that list you will find some .webpart / .dwp files - that files represent the "templates" of preconfigured web parts that will be available when browsing the gallery. That also means that if you don't have a file, you won't see the relative WP in the gallery.

Usually the file is added by a module in a specific feature that should be defined at Site Collection level. Under standard settings visual studio will automagically activate said feature during deploy, so this would explain why you didn't need to activate it manually before... I suspect you are simply missing this step.

share|improve this answer

You need to install the WSP file in the farm, adding the WSP will just add the WSP to the Solution Gallery. Open Central Administration >> System Settings >> Farm Solutions. You will see your solution added there but not yet deployed, there you can deploy.

If you prefer Powershell, you can execute Install-SPSolution

share|improve this answer
    
Thank you for your answer :) I have already added the solution and its showing in the "Farm Solutions". My problem is that I am unable to see the Visual web part which was inside .wsp file. I cannot find the visual web part while adding a new web part in the page I created. –  Tushar Sakhare Aug 26 '13 at 7:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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