11

How can I disable it?

In the following screenshot you can see six processes that all begin with ServiceHub. These start when I start Visual Studio 2017 Community. Annoyingly, they do not stop when I exit Visual Studio 2017 Community. I would like to know how to disable these so that they do not start in the first place.

How can I enable it?

What turns these on?

Screenshot

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sapbucket
  • 6,795
  • 15
  • 57
  • 94
  • 1
    I also have these guys running when DevEnv is open, but they exit once all DevEnv processes have gone. I think they are used by some dev env plugins from Microsoft, ServiceHub is some kind of a generic proxy that communicates with Azure or VS Online, I think , I don't think you can get rid of them (w/o endangering your setup) – Simon Mourier Jan 10 '18 at 14:15
  • @Simon: I wish I knew what caused them to turn on. I do not use Azure or VS Online. I thought maybe I had installed a package that has a dependency on those and maybe I absentmindedly skipped past the notification of the dependency. Or even my vs2017 CE during update caused those to be turned on. I still do not know. But I am certain that nothing in my solution uses these services. For example, I can forcibly terminate them in Task Manager and all of my project unit tests are still passing with green lights. – sapbucket Jan 10 '18 at 19:31
  • 1
    Oh, you know, a standard VS install literally hundreds of addons w/o one notices... I'm not even speaking of 3rd parties, Microsoft alone is reponsible for a good part – Simon Mourier Jan 10 '18 at 22:01
  • 1
    [Why should I not upload images of code/data/errors when asking a question?](https://meta.stackoverflow.com/q/285551/3404097) [Why are images of text, code and mathematical expressions discouraged?](https://meta.stackexchange.com/q/320052/266284) – philipxy Sep 11 '22 at 11:42
  • (An answer is related to [a meta post](https://meta.stackoverflow.com/questions/420316) - though it *may* have been automatically deleted by the time you read this (then only visible for users with more than 10,000 reputation points).) – Peter Mortensen Sep 12 '22 at 17:42
  • Five years later, and VS2022 still leaves bits of this thing running... – McGuireV10 Aug 10 '23 at 09:59

2 Answers2

8

First Workaround:

Tools > Options > Text Editor > JavaScript/TypeScript > Language Service...
Uncheck Enable the new JavaScript language service.

OR:

Tools > Extensions and Updates > TypeScript for Microsoft Visual Studio > Disable

Second Workaround:

Rename ServiceHub.Host.Node.x86.exe and if you want to enable it just rename to original file:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\ServiceHub\Hosts\ServiceHub.Host.Node.x86\

Linked:

  1. https://developercommunity.visualstudio.com/content/problem/30326/how-to-avoid-nodeexe-and-servicehubhostnodex86exe.html

  2. https://developercommunity.visualstudio.com/content/problem/31406/visual-studio-2017-nodejs-server-process-turn-off.html

  3. https://developercommunity.visualstudio.com/content/problem/27033/nodejs-server-side-javascript-process-consuming-to.html?childToView=27629#comment-27629

  4. Visual Studio 2017 - Node.JS Server Process - Turn off?

  • When using VS 2017 the second workaround worked at first, but VS now crashing, attaching VS to debug the exception reveals that the exception message is: `Could not start process: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\ServiceHub\Hosts\ServiceHub.Host.Node.x86\ServiceHub.Host.Node.x86.exe` I'm not sure why it's an intermittent crash, but it's not a valid workaround because of this. – fartwhif May 14 '19 at 16:26
  • follow this post https://developercommunity.visualstudio.com/content/problem/31406/visual-studio-2017-nodejs-server-process-turn-off.html –  May 14 '19 at 17:09
  • The "Second Workaround" is a truly bad idea. It results in a crash the moment you open a solution that has JS/TS in it, and makes Studio unstable. – PKD Jun 14 '19 at 15:45
  • This is more or less a rehashing of the Stack Overflow question *"[Can I turn off the Node.js server process associated with Visual Studio 2017?](https://stackoverflow.com/questions/42769106/)"*. Which indicates that one of the questions is a duplicate of the other. – Peter Mortensen Sep 16 '22 at 11:48
0

Those errors happened when I was using Visual Studio Installer (after downloading the packages I selected) which was opened through the option to install more project templates (New Project window) in Visual Studio.

I just closed Visual Studio and the conflicts were gone from the Installer allowing the installation to proceed normally.

CPHPython
  • 12,379
  • 5
  • 59
  • 71