Saturday, December 24, 2016

Your web part will not appear in the toolbox - Office 365

Your web part will not appear in the toolbox - Office 365

You get below error when you try to load the webpart in the Office 365 workbench (for the first time in the workbench.aspx) after you perform "gulp serve"

----------------------------------
Your web part will not appear in the toolbox. Please make sure "gulp serve" is running in a web part project. Please refresh the page once "gulp serve" is running.
--------------------------------

To resolve this error, you will be to first run the below command to install the certificate (note that the certification error in the local workbench also disappears after this)

gulp trust-dev-cert

After this, you can run gulp serve to again see the local workbench and then launch the office 365 tenant site to see if your locally developed webpart is available to be added on the workbench.aspx

Monday, February 1, 2016

Extract WSP file from SharePoint Central Admin Web app

$farm = Get-SPFarm
$file = $farm.Solutions.Item("nameofwsp.wsp").SolutionFile
$file.SaveAs("C:\temp\nameofwsp.wsp");