In this post will show you how to deploy a web part to the production environment e.g A site collection in SharePoint Online.

This post has also been published at my personal SharePoint blog.

  1. Open the existing Web Part project in Visual Studio 2013.
  2. Select Feature1 and you can change the scope of the deployment here. Scope: Site means this feature will be a Site Collection feature and web part inside this feature will be available in the whole site collection.
  3. Select Build -> Publish -> Publish to File System. Provide location and hit Publish. This will generate the WSP (myVisualWebPart.wsp).
  4. Go to the production site (my production site is on SharePoint Online).
  5. Go to Site Settings -> Solutions under Web Designer Galleries.
  6. Select Upload Solution -> Choose file and select the WSP file from your desktop and upload it.
  7. Once the solution package is uploaded select Activate. This action will activate the feature and make the web part available in the web part gallery.
  8. If you go to Site Settings -> Site collection features under Site Collection Administration. You will see your feature activated here.

  9. Now go to any page on the production site and add your web part. It should be available under Custom category.

Thanks heaven for the easy deployment =).

About the author 

Tahir Naveed