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

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.


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