private static IVisualStudio GetActiveVisualStudio(VisualStudioVersion version, ILogger logger)
        {
            IVisualStudio visualStudio = null;
            ForEachApplicableVersion(version, aVersion =>
            {
                object obj = GetActiveObject(versionInfos[aVersion].ProgID);
                if (obj != null)
                {
                    visualStudio = new VisualStudio((DTE) obj, aVersion, false, logger);
                    return true;
                }

                return false;
            });

            return visualStudio;
        }