Tag Archives: Solutions

Error creating solution. The maximum total file size limit (xxxxx bytes) has been exceeded in SharePoint 2010

Problem

You try to save your site as a site template but SharePoint throws up the error:

Error creating solution. The maximum total file size limit (xxxxx bytes) has
been exceeded in SharePoint 2010.

Solution

You need to use powershell to change the solution file size limit in SharePoint. This cannot be done from the UI.

Refer to this article for the actual solution:

http://community.corasworks.net/blogs.aspx?CWFrameSource=http://community.corasworks.net/blogs/AdamMacaulay/archive/2010/01/25/error-creating-solution-the-maximum-total-file-size-limit-10485760-bytes-has-been-exceeded-in-sharepoint-2010-.aspx

 

Comments ( 0 )

Using Powershell to Add and Activate a Sandboxed Solution or Site Template

Problem

My recent adventures have required me to work extensively with Site templates. The site template was created with the SharePoint 2010 UI but had to be imported to an old Intranet site running SharePoint 2010 but using the 2007 UI.

After uploading the solution (.wsp) file to the old Intranet site, I found that I could not activate the solution. When I clicked on ‘Activate’ from the drop down menu, a blank white box would appear. It seemed like SharePoint was trying to render the silverlight dialog box but could not due to 2007 UI limitations.

Solution

The way I got around this problem was to activate the solution in Powershell.

  1. Open SharePoint Management Shell
  2. Get-SPUserSolution -site <url to your site collection>
  3. Take note of the name of the .wsp file.
  4. To activate the solution, type the following command:
  5. Install-SPUserSolution -identity “your solution.wsp” -site <url to your site collection> <<- Replace “your solution.wsp” with the name of your solution.
Comments ( 0 )

Export / import all WSP (solutions) between farms.

Requirement

Sometimes you need a quick way to deploy all solutions from your test environment to your production farm.

Solution

Found a great site that shows you how to do this with Powershell in 3 simple commands.

http://msmvps.com/blogs/shane/archive/2011/05/05/using-powershell-to-export-all-solutions-from-your-sharepoint-2010-farm-and-other-fun.aspx

 

Comments ( 0 )

Exporting solutions between farms

Requirement

Export all solutions from one farm and deploy it to another farm.

Solution

Using Windows Powershell, run the following commands:

Export farm solutions

(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + “\” + $_.Name; $_.SolutionFile.SaveAs($var)}

This will export all solutions in the farm to the path “\”. Solutions were exported to C:\ as *.wsp files.

You can either choose to copy the *.wsp files and import your solution manually using the following commands:

  • Add-SPSolution <path to wsp file>
  • Install-SPSolution <solution guid> -gacdeployment -webapplication <url>

Or, you may import all your solutions automatically by running the following command.

Import your solutions

Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

Deploy your solutions

Get-SPSolution | ForEach-Object {If ($_.ContainsWebApplicationResource -eq $False) {Install-SPSolution -Identity $_ -GACDeployment} else {Install-SPSolution -Identity $_ -AllWebApplications -GACDeployment}}

See Shane’s blog for more information:

 

Comments ( 0 )