This article addresses an error associated with “ChannelOperationTimeout” when using Visual Studio to deploy SharePoint WSPs. The error in question looks like this:
Error occurred in deployment step ‘Activate Features’: A timeout has occurred while invoking commands in SharePoint host process.
Or:
Error occurred in deployment step ‘Add Solution’: A timeout has occurred while invoking commands in SharePoint host process.
So far, I have only ever got these error messages when working with C# code for SharePoint in Visual Studio. From my investigation and considering the unique situations when I have been hit with the above error, I can conclude that it is usually caused when…
- The server or virtual machine you’re working with is particularly slow or low on resources.
- The solution package in question that you’re attempting to deploy is very large so that the deployment time exceeds the default 2 minutes (120 seconds).
Fix it by setting ChannelOperationTimeout
The fix involves adding a key to the local machine registry (this key wouldn’t exist by default).
Using registry editor, go to the following key:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SharePointTools
Or (if you’re working with Visual Studio 2013):
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SharePointTools
Add ChannelOperationTimeout as a DWORD with a value greater than 120. You may do a little trial and error to decide on the exact value you want to set. Don’t set it too high though, as this may impact performance.
After changing the registry, restart Visual Studio and your WSP should deploy without issues.
The ChannelOperationTimeout property gets or sets the time period within which an operation must complete or an exception is thrown. See here for more information.
I cant find this path : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SharePointTools
I am using sharepoint 2016 and visual studio 2017. can you help please?
Hi Keshav,
The version number of Visual Studio 2017 is 15.0. So instead of
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SharePointTools
Please try
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0\SharePointTools
Hope that helps.