Extracting Solution Packages (WSPs) from SharePoint using PowerShell

I just stumbled across this link from Kirk Evanshttp://blogs.msdn.com/b/kaevans/archive/2011/12/05/extract-a-wsp-solution-from-sharepoint-2010.aspx

Basically, using 3 lines of PowerShell (which can be turned really into one if needed), to extract a SharePoint Solution Package (WSP) from the Farm Solutions collection.

From his post:

$farm = Get-SPFarm

$file = $farm.Solutions.Item("extendeddiagnosticproviders.wsp").SolutionFile

$file.SaveAs("c:\temp\extendeddiagnosticproviders.wsp")

As awesome as it is easy.

Advertisement

Encoding Encoded Characters in XSLT for Deployment

Let’s say you are deploying out some pages, which may include some custom forms out to a list. In that case, it is pretty straight forward (example: http://www.3guysonsharepoint.com/?p=1004), just do a find and replace in your XLST for < and >, and replace with &lt; and &gt; respectively, paste it within the XSL property (<property name="Xsl" type="string">).

One thing that may trip you up, is if you actually need to keep a < or > sign in your XSLT – but, you cannot deploy the code with that, or else you’ll run into issues…

The fix? Quite simple, just encode the encoded characters, changing the ampersand (&) to &amp;lt; and &amp;gt;, also respectively.

%d bloggers like this: