public void loadO2PlatformVSEnvironment() { try { VisualStudio_O2_Utils.waitForDTEObject(); VisualStudio_O2_Utils.waitForOutputWindow(); //VisualStudio_2010.O2_OutputWindow. "[O2_Platform_VisualStudio_2010Package] Package: {0}, DTE: {1}".info(VisualStudio_2010.Package, VisualStudio_2010.DTE2); CompileEngine.LocalFoldersToSearchForCodeFiles.Add(this.type().assemblyLocation().parentFolder()); // so that "{file}".local() is able to find files included with this //CompileEngine.clearCompilationCache(); VisualStudio_O2_Utils.compileAndExecuteScript(@"VS_Scripts\O2_Platform_Gui.cs", "O2_Platform_Gui", "buildGui"); } catch (Exception ex) { ex.log("in O2_Platform_VisualStudio_2010Package Initialize"); } }
//helps to debug cases where there is a assembly load error triggered by the JIT public void LocalInitialize() { if (VisualStudio_2010.Initialized.isFalse()) { try { if (Control.ModifierKeys == Keys.Shift) { VisualStudio_O2_Utils.open_LogViewer(); } populateDefaultVSComObjects(); VisualStudio_2010.Initialized = true; //VisualStudio_O2_Utils.compileAndExecuteScript(@"VS_O2_PlugIns\O2_Platform_Gui.cs", "O2_Platform_Gui", "buildGui"); } catch (Exception ex) { ex.log("[open_ScriptEditor]"); Debug.WriteLine("[open_ScriptEditor] " + ex.Message); } } }
//helps to debug cases where there is a assembly load error triggered by the JIT public void LocalInitialize() { if (VisualStudio_2010.Initialized.isFalse()) { try { if (Control.ModifierKeys == Keys.Shift) { VisualStudio_O2_Utils.open_LogViewer(); } populateDefaultVSComObjects(); VisualStudio_2010.Initialized = true; O2Thread.mtaThread( () => new O2Platform_VisualStudio().loadO2PlatformVSEnvironment()); } catch (Exception ex) { ex.log("[open_ScriptEditor]"); Debug.WriteLine("[open_ScriptEditor] " + ex.Message); } } }