private void SetupSolutionEvents()
{
// Subscribe to solution events
ThreadHelper.ThrowIfNotOnUIThread();
IVsSolution sol = (IVsSolution)_sccProvider.GetService(typeof(SVsSolution));
sol.AdviseSolutionEvents(this, out _vsSolutionEventsCookie);
var sbm = _sccProvider.GetService(typeof(SVsSolutionBuildManager)) as IVsSolutionBuildManager2;
if (sbm != null)
{
sbm.AdviseUpdateSolutionEvents(this, out _vsIVsUpdateSolutionEventsCookie);
}
}