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.
- Open the existing Web Part project in Visual Studio 2013.
- 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.
- Select Build -> Publish -> Publish to File System. Provide location and hit Publish. This will generate the WSP (myVisualWebPart.wsp).
- Go to the production site (my production site is on SharePoint Online).
- Go to Site Settings -> Solutions under Web Designer Galleries.
- Select Upload Solution -> Choose file and select the WSP file from your desktop and upload it.
- 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.
- If you go to Site Settings -> Site collection features under Site Collection Administration. You will see your feature activated here.
- Now go to any page on the production site and add your web part. It should be available under Custom category.