devenv process keeps running in background after I close Visual Studio 2015
Asked Answered
M

5

19

Problem


When I close Visual Studio 2015 by pressing the close button on the IDE, the devenv.exe process keeps running in background between 3-5 minutes, after that time, it closes automatically, really strange.

I discovered this issue because I was trying to install an extension automatedly using DTE (in the same way as I did for Visual Studio 2013 in the past without any problem), but when I call the method dte.Quit() it does not makes Visual Studio 2015 to close, the devenv.exe will keeps in background forever (until a manual process kill).

Question


Someone could have an idea why I'm suffering this issue?.

Someone has the same issue?, someone found a way to fix it?.

It is an official bug?, is there an update or patch?.

Or maybe in the worst case following new Microsoft "philosophy" it could be one of their spy mechanisms that keeps running even when the end-user tried to close the IDE?.

Research


I have poor knowledges for problem resolutions like this like debugging a 3rd party app or reverse engineering knowledges but I did some basic things:

  • Tried procmon from SysInternals but I didn't noticed any strange call.
  • Also I used a Nirsoft app called WhatIsHang which determines any current applications that are hanging in the system then shows some debug info of it, but WhatIsHang does not recognize any hang of devenv.exe, so at least I know that devenv.exe is not hanging, it seems to be just aparently "inactive" doing something strange, and the process never exits by himself.

Environment Specifications


Windows Version:

Windows Spy 10, aka Windows 10 Professional (v10.0.10240) of 64-Bit, running on VMWare WorkStation.

Visual Studio Version:

2015 Professional (v14.0.23107.0)

3rd Party IDE extensions or any other sort of modification Installed?:

No, it's a fresh install of the product.

Mairemaise answered 16/8, 2015 at 13:4 Comment(6)
These types of statements make me wonder why you'd even develop on the MS platform if you believe them to be wholly true: Or maybe in the worst case following new Microsoft "philosophy" it could be one of their spy mechanisms that keeps running even when the end-user tried to close the IDE?Artina
@Metro Smurf Thanks for comment, well, of course I totally disappoint of those new Microsoft spy techniques then I can talk about it or even ask whether its an spy issue 'cause the chance exists, Windows 10 collects file metadata and sends it trough MS servers, also Windows 10 its just a keylogger O.S. which sporadically intercepts keystrokes, encrypts the data and sends it to Microsoft (and the end-user has any official tool to know at any moment what data was sent, +1 for Microsoft, pff...), so knowing this, Visual Studio 2015 could have something similar, why not?, I just asked it.Mairemaise
Anyways windows for me still the best OS even with its new spying mechanisms, I'm not a Microsoft hater, but that is what the best products/services on the market does, when they have "the people inside the bubble", when they can't exit, the shark companys start doing these nasty kind of things shamelessly, some examples are Youtube and its Video-Ads, Google and its App-Ads on Android or Facebook and its spy features,Mairemaise
create a dump of the hanging process, open it in Windbg, fix the symbols and run !analyze -v -hang. Now look if you can find useful info in the callstackPolak
I also keep encountering this issue, that visual studio will not exit unless process is killed through task manager. I have performed Analyze Wait Chain repeatedly and all it reports is everything is normal for devenv.exe.Philibeg
try restart your pc and run again as administratorBreathing
F
3

To have devenv.exe automatically close when launched using automation, call dte.UserControl = false;

http://www.mztools.com/articles/2005/mz2005005.aspx

DTE.UserControl: when set to True, the IDE remains open after you are done with the automation. This is useful if you want to open the IDE, perform some action, and keep it open for the user to continue using it. When set to False, the object is released after you are done with the automation and the devenv.exe process shouldn't remain in memory (use the Task Manager to verify it). If it stays in memory, it means that you are not releasing all COM wrappers used to automate it.

Forster answered 8/12, 2015 at 5:44 Comment(2)
Can this setting be set by using some kind of command line switch?Hanshaw
@Bogdan, the documentation for the devenv.exe command line switches can be found here: msdn.microsoft.com/en-us/library/xee0c8y7.aspx. Depending on your requirements, the /Runexit command line switch may be what you want, but I don't know enough about your requirements. You should probably ask a new question.Forster
S
3

Go to task manager, then Background processes. There close the visual studio. It worked for me.

Secondguess answered 15/9, 2020 at 7:56 Comment(0)
Q
1

I also encountered this issue, and I just managed to get it solved purely by chance. I was using Resharper 9, and I just upgraded to Resharper 10. This solved it for me.

EDIT: It appears my joy was premature; After opening a more complex solution, VS2015 again refuses to exit after closing...

Quiles answered 25/1, 2016 at 8:41 Comment(3)
Thanks for answer. Try follow setting the property mentioned on the accepted answer, it worked for me in VS2015. Anyways I don't understand in which way how you managed to get it solved just by installing a refactor plugin/extension because the issue is not involved in any way with that plugin :PMairemaise
It could be that Resharper uses an automation call that keeps devenv.exe alive... and Resharper 10 is smarter and releases the resource properly...Quiles
+1 for complex solution - I encounter this issue only on a specific complex solution (100+ projects, don't ask)Brandibrandice
T
0

I had an error with devenv to install SQL Server Data Tools (SSDT) with Visual Studio 2017.

I restart Windows 10 Pro and the error disappeared

enter image description here

enter image description here

Talkingto answered 16/8, 2021 at 23:4 Comment(0)
T
0

An abrupt approach but should definitely kill the process. Because I can't find in the task manager, I resorted to killing the process via CMD terminal

taskkill /F /PID (id) -- where id is the process id

After running the command, you would see the following message if successful.

SUCCESS: The process with PID 21916 has been terminated.

Then just continue with your installation.

T answered 25/3, 2022 at 2:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.