8

I have Visual Studio 2015 version 14.0.25431.01 Update 3. When I am working with my solution it randomly starts to use all the CPU. Sometimes when I am not on the VS window, or just typing code.

If I open Task Manager I see that vbcscompiler.exe is using 90-100% of CPU. I have Intel Core i7 2.7GHz with 8 cores i think it's should be able to handle it without any issues.

This freezes my computer and I can't do anything for 10-20 seconds, which is very frustrating.

Does anyone know what could be the issue?

--------------4/12/2017 UPDATE--------------

Single instance of vbcscompiler.exe is running. Happens with Windows Service; Web Service; Console Application. Large and small solutions.

See below task manager screenshot. enter image description here

8
  • I will post it as a comment though I'm not sure maybe it should be an answer... I had this problem also on the exact same version Visual Studio 2015 14.0.25431.01 Update 3 after I updated a couple of days ago. What solved it for me (In the past few days and hopefully forever) was to turn off the automatic startup page content download. You can try too by Options -> Startup -> Uncheck "Download content every" checkbox. It seems fine now but its hard to tell. You can try and tell me if it worked for you too. Good luck for us both Commented Apr 6, 2017 at 17:43
  • Thank you for comment but I already had "Download content every" unchecked. VBCSCompiler.exe is part of roseline and compiles code, what I don't understand why it randomly compiles when nothing changes, and takes all the CPU.
    – Farukh
    Commented Apr 6, 2017 at 18:02
  • Thanks for the update. Anyway remember you can always just reinstall it (I guess you're trying to avoid that) I cross fingers for you. Good luck! Commented Apr 6, 2017 at 19:09
  • What type of app are you writing? Or does it happen on different types of projects?
    – Kyle B
    Commented Apr 10, 2017 at 18:42
  • What kind of project is it? Web one? large/small? Problem happen with simple "hello world" project? Check File & Product version of the running vbcscompiler.exe - in Task Manager view Properties then Details tab. Version I have is 1.3.1.60616. If you have WebApplication projects, they might be using old VBCSCompiler. Also check the number of instances of vcscompiler.exe....multiple ones keep getting created? See: stackoverflow.com/questions/31708758/… and forum.ncrunch.net/… Commented Apr 12, 2017 at 2:03

1 Answer 1

2

I've just done some digging on this issue. It looks like the root cause is a new feature of the Roslyn compiler in which it keeps the compiler process around after the build has finished. Over time, the memory consumption accumulates and as far as I can tell, there's nothing that actually kills the compiler, even when its host process terminates.

Most likely VS has some kind of built-in awareness of this process that allows it to specifically terminate it when the IDE shuts down.

Anyway, this behavior can be turned off. The bad news is that this needs to be done inside the project XML. I realize you work on a very large solution, so if you have a shared build file then this would be ideal, but otherwise you'll need to place the following into each of your projects:

<PropertyGroup>
    <UseSharedCompilation>false</UseSharedCompilation>
</PropertyGroup>

Also there is another post from before that might be good for you to look at.

Check your configs and everything with the solutions here and see if they match:

Numerous instances of VBCSCompiler.exe

1
  • as description says I am having issue with CPU not memory. And and screenshot is showing I only have one instance running. So this answer is not solving issue I am having.
    – Farukh
    Commented Apr 21, 2017 at 19:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.