// Internal for testing
        internal void ProjectOperations_EndBuild(object sender, BuildEventArgs args)
        {
            if (args == null)
            {
                throw new ArgumentNullException(nameof(args));
            }

            _foregroundDispatcher.AssertForegroundThread();

            if (!args.Success)
            {
                // Build failed
                return;
            }

            var projectItem = args.SolutionItem;

            if (!_projectService.IsSupportedProject(projectItem))
            {
                // We're hooked into all build events, it's possible to get called with an unsupported project item type.
                return;
            }

            var projectPath = _projectService.GetProjectPath(projectItem);

            // Get the corresponding roslyn project by matching the project name and the project path.
            foreach (var projectSnapshot in _projectManager.Projects)
            {
                if (string.Equals(projectPath, projectSnapshot.FilePath, StringComparison.OrdinalIgnoreCase))
                {
                    _projectManager.HostProjectBuildComplete(projectSnapshot.HostProject);
                    break;
                }
            }
        }
        // This gets called when the project has finished building.
        public int UpdateProjectCfg_Done(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, int fSuccess, int fCancel)
        {
            var projectPath = _projectService.GetProjectPath(pHierProj);

            // Get the corresponding roslyn project by matching the project name and the project path.
            foreach (var projectSnapshot in _projectManager.Projects)
            {
                if (string.Equals(projectPath, projectSnapshot.FilePath, StringComparison.OrdinalIgnoreCase))
                {
                    _projectManager.HostProjectBuildComplete(projectSnapshot.HostProject);
                    break;
                }
            }

            return(VSConstants.S_OK);
        }