SharePoint 2010 deployment timing out in visual Studio 2010

First of all, this is something that shouldn’t really happen, in my case the VMs that we were developing on were very slow due to some hardware problems.  However it’s  possible when you have features that need to do a lot of work during activation for these features to exceed the 2 minutes activation limit.

One of my features created a list with about 200 items during activation of a feature. the activation of this feature exceeded 120 seconds (this is the default value of the timeout setting within Visual Studio).

Within the output window I got the following message:

Error occurred in deployment step ‘Activate Features’: A timeout has occurred while invoking commands in SharePoint host process.

I noticed that about 100 items were created in my list and when I checked again a while later all items were there, so things weren’t actually failing at all.

So how can you increase this timeout?

In the loccal registry within the following key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SharePointTools

there is a setting ( this doesn’t exist by default):

ChannelOperationTimeout

Add the above as a DWord and set it to something higher than 120. After chnaging the registry you will need to restart Visual Studio and things should deploy without any problem.

Advertisements

Please leave a comment or feedback

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.