Search This Blog

Wednesday, December 21, 2011

How To – Deploy a SharePoint 2010 Visual Web Part

How To – Deploy a SharePoint 2010 Visual Web Part Build the solution from Visual Studio 2010. Package the solution. Go to the Build menu and select Package. Deploy solution to SharePoint server. Browse to the directory which contains your webpart.wsp file. Copy this file to a local directory on the SharePoint server. Log on to the SharePoint server and open the SharePoint 2010 Mangement Shell. Run the following command: Add-SPSolution –LiteralPath . Deploy solution to your SharePoint site. Open SharePoint 2010 Central Administration Browse to System Settings -> Manage farm solutions. Click your webpart.wsp. Click Deploy Solution. Select the appropriate options and click OK. Add the solution to the Web Part Gallery. Browse to http://Server/_layouts/newdwp.aspx. Select the checkbox next to your solution. Click Populate Gallery. Your web part should now show in the Gallery and be available for use on site pages.

1 comment:

  1. Add-SPSolution c:\code\SharePointProject2\bin\debug\SharePointProject2.wsp
    Install-SPSolution –Identity SharePointProject2.wsp –WebApplication http://sp2010 -GACDeployment

    ReplyDelete