• Skip to main content
  • Skip to primary sidebar

Technical Notes Of
Ehi Kioya

Technical Notes Of Ehi Kioya

  • About
  • Contact
MENUMENU
  • Blog Home
  • AWS, Azure, Cloud
  • Backend (Server-Side)
  • Frontend (Client-Side)
  • SharePoint
  • Tools & Resources
    • CM/IN Ruler
    • URL Decoder
    • Text Hasher
    • Word Count
    • IP Lookup
  • Linux & Servers
  • Zero Code Tech
  • WordPress
  • Musings
  • More
    Categories
    • Cloud
    • Server-Side
    • Front-End
    • SharePoint
    • Tools
    • Linux
    • Zero Code
    • WordPress
    • Musings
Home » SharePoint » Visual Studio ChannelOperationTimeout “while invoking commands in SharePoint host process”

Visual Studio ChannelOperationTimeout “while invoking commands in SharePoint host process”

By Ehi Kioya 2 Comments

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.

Found this article valuable? Want to show your appreciation? Here are some options:

  1. Spread the word! Use these buttons to share this link on your favorite social media sites.
  2. Help me share this on . . .

    • Facebook
    • Twitter
    • LinkedIn
    • Reddit
    • Tumblr
    • Pinterest
    • Pocket
    • Telegram
    • WhatsApp
    • Skype
  3. Sign up to join my audience and receive email notifications when I publish new content.
  4. Contribute by adding a comment using the comments section below.
  5. Follow me on Twitter, LinkedIn, and Facebook.

Related

Filed Under: Backend (Server-Side), Programming, SharePoint, Visual Studio Tagged With: CSharp, Programming, SharePoint, Visual Studio

About Ehi Kioya

I am a Toronto-based Software Engineer. I run this website as part hobby and part business.

To share your thoughts or get help with any of my posts, please drop a comment at the appropriate link.

You can contact me using the form on this page. I'm also on Twitter, LinkedIn, and Facebook.

Reader Interactions

Comments

  1. keshav says

    July 19, 2018 at 6:45 am

    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?

    Reply
    • Ehi Kioya says

      July 19, 2018 at 10:34 am

      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.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

23,569
Followers
Follow
30,000
Connections
Connect
14,568
Page Fans
Like
  • Recently   Popular   Posts   &   Pages
  • Actual Size Online Ruler Actual Size Online Ruler
    I created this page to measure your screen resolution and produce an online ruler of actual size. It's powered with JavaScript and HTML5.
  • How To Install PHP Packages Without Composer How To Install PHP Packages Without Composer
    This article shows how to bypass the Composer barrier when installing Composer-dependent PHP packages. Great shortcut for PHP enthusiasts!
  • Fix For “Function create_function() is deprecated” In PHP 7.2 Fix For "Function create_function() is deprecated" In PHP 7.2
    As of PHP 7.2 create_function() has been deprecated because it uses eval(). You should replace it with an anonymous function instead.
  • About
  • Contact

© 2022   ·   Ehi Kioya   ·   All Rights Reserved
Privacy Policy