MsAdvisor

All Things MS Learned & Utilized

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

I ran into this error when I was creating new upgraded solutions from 2007 templates and needed to get around it. Normally I would have used “stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000” to do so but sadly I kept getting a “Windows SharePoint Services Tool Has Stopped Working” error so I needed to find another way. Then I thought of using PowerShell to do the same thing, so I created a script to do so. I noticed that someone had created some script for enabling the Developer Dashboard. Since the property “MaxDocumentTemplateSize” is a part of the same SPWebService class, I decided to retrofit it to meet my needs. I hope it helps you.

This script will by default reset the size of your WSP solution creation size to 50mb. If you would rather something different then call the script with the parameter “TemplateDocSize” and set it to your choice in bytes.

To Download the PowerShell Script Click Here

Use:

UpdateMyDocTemplateSize –MaxDocumentTemplateSize <Number Of Bytes>

Example:

UpdateMyDocTemplateSize (Reset Size to 50mb)

UpdateMyDocTemplateSize 30000000 (Reset size to 30mb)

UpdateMyDocTemplatesize –MaxDocumentTemplateSize  30000000 (Reset size to 30mb)

About these ads

January 25, 2010 - Posted by | Uncategorized

4 Comments »

  1. Thanksssss alot !!

    Comment by Nabeel ! | November 11, 2011 | Reply

  2. Thanks for the script. Just what I wanted. Only need another clause of the village – in the Central Administration – to increase the quota for “Solutions Catalog” for this application.
    Google translator taxis :)

    Comment by Maxim | December 29, 2011 | Reply

  3. […] Гугл сначала меня направил на русский TechNet, а там я нашел эту ссылочку: http://msadvisor.wordpress.com/2010/01/25/error-creating-solution-the-maximum-total-file-size-limit-… […]

    Pingback by Ошибка при создании шаблона сайта - превышен максимальный размер файла | Скрипты | December 29, 2011 | Reply

  4. Thanks, this is useful. It seems that PowerShell will return the default value where the stsadm command will not so this is useful to reset it back if you need to.

    Comment by Peter Jacoby | January 12, 2012 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: