ElektroStudios
ElektroStudios

Reputation: 20464

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

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:

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.

Upvotes: 19

Views: 27147

Answers (5)

vpbot
vpbot

Reputation: 2487

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.

Upvotes: 0

Jonathan Mendoza
Jonathan Mendoza

Reputation: 480

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

Upvotes: 0

ramnarayan
ramnarayan

Reputation: 161

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

Upvotes: 3

Aviad P.
Aviad P.

Reputation: 32639

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...

Upvotes: 1

Rami A.
Rami A.

Reputation: 10582

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.

Upvotes: 3

Related Questions