Good evening,
In my project, I'm starting Visual Studio 2015 as follows:
Type type = Type.GetTypeFromProgID("VisualStudio.DTE.14.0");
dte = (EnvDTE80.DTE2)Activator.CreateInstance(type);
dte.MainWindow.Visible = true;
dte.Solution.Open(UserPreferences.Instance.ProjectSlnFilePath);I've noticed that when I close the IDE, a Visual Studio background process starts running for some reason. I'm looking for a way to detect when the IDE is being closed, in order to somehow kill or avoid that background process
from being created. I tried to do the following, based on
this thread:
dte.Events.DTEEvents.OnBeginShutdown += DTEEvents_OnBeginShutdown;
But it doesn't trigger. I've tried other events, such as Window_Closing and so on, but for what it's worth, the only events I got working so far are Events.WindowsEvents.WindowActivated and Events.SolutionsEvents.Opened.
Any ideas? Thanks!