private bool CanCheckout()
        {
            var service = (IVsQueryEditQuerySave2)_solution.GetService(typeof(SVsQueryEditQuerySave));

            if (service == null)
            {
                return(true);
            }

            var  files = new[] { _project.FullName };
            uint editVerdict;
            uint moreInfo;

            return((0 == service.QueryEditFiles(0, files.Length, files, null, null, out editVerdict, out moreInfo)) &&
                   (editVerdict == (uint)tagVSQueryEditResult.QER_EditOK));
        }
        public void UnloadProject()
        {
            var solution = Solution.GetService(typeof(SVsSolution)) as IVsSolution4;

            var projectGuid = Solution.GetProjectGuid(ProjectHierarchy);

            solution?.UnloadProject(ref projectGuid, (int)_VSProjectUnloadStatus.UNLOADSTATUS_UnloadedByUser);
        }