Esempio n. 1
0
        public static VisualStudio Create(TextWriter logTo = null)
        {
            var vs = new VisualStudio(logTo);
            vs.Log.Write("Loading Visual Studio...");

            vs._messageFilter = new MessageFilter();

            var dteComClassName = Type.GetTypeFromProgID("VisualStudio.DTE", true);
            vs._dte = (DTE) Activator.CreateInstance(dteComClassName);

            vs.Log.WriteLine(" OK");
            return vs;
        }
Esempio n. 2
0
        public static VisualStudio Create(TextWriter logTo = null)
        {
            var vs = new VisualStudio(logTo);
            vs.Log.Write("Loading Visual Studio...");

            vs._messageFilter = new MessageFilter();

            //TODO: hard coded to vs 2012 need to modify for other version of vs.
            //http://www.mztools.com/articles/2011/MZ2011011.aspx
            var dteComClassName = Type.GetTypeFromProgID("VisualStudio.DTE.11.0", true);
            vs._dte = (DTE) Activator.CreateInstance(dteComClassName);

            vs.Log.WriteLine(" OK");
            return vs;
        }