Esempio n. 1
0
 private void OnSolutionAfterClosing()
 {
     _outputPane.Shutdown();
     _outputPane = null;
     _plugin.Shutdown();
     _plugin = null;
 }
Esempio n. 2
0
 public void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Action != vsBuildAction.vsBuildActionClean)
     {
         VsOutputPane.LogMessage("Building (" + Scope.ToString() + ").");
     }
 }
Esempio n. 3
0
        private void OnSolutionOpened()
        {
            if (_plugin != null)
            {
                return;
            }

            _outputPane = new VsOutputPane();
            _outputPane.Init(DTE);
            VsOutputPane.ClearLog();
            VsOutputPane.FocusOnLog();

            _plugin = new Plugin();
            _plugin.Init(DTE);
        }
Esempio n. 4
0
        /// <summary>
        /// Converts PDB to MDB for each dll project.
        /// </summary>
        private void CompilePDBs()
        {
            if (!IsCESharpSolution)
            {
                VsOutputPane.LogMessage("Skipping PDB conversion (No CE# Project).");
                return;
            }

            VsOutputPane.LogMessage("Compiling PDB's.");

            var ceRoot  = new FileInfo(MonoDebuggerLaunchProvider.Command).Directory.FullName;
            var pdb2mdb = Path.GetFullPath(ceRoot + "/../../Tools/pdb2mdb/pdb2mdb.exe");

            if (!File.Exists(pdb2mdb))
            {
                VsOutputPane.LogError("Cannot find PDB2MDB executable.");
                return;
            }

            foreach (Project p in DTE.Solution.Projects)
            {
                string outputFileName = p.Properties.Item("AssemblyName").Value.ToString() + ".dll";

                var    fullPath   = new FileInfo(p.Properties.Item("FullPath").Value.ToString()).Directory.ToString();
                var    outputPath = p.ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value.ToString();
                string outputDir  = Path.Combine(fullPath, outputPath);

                // Skip if MDB is newer than PDB.
                var pdbFullName = Path.Combine(outputDir, outputFileName.Substring(0, outputFileName.Length - 4) + ".pdb");
                var mdbFullName = Path.Combine(outputDir, outputFileName + ".mdb");
                if (File.Exists(pdbFullName) && File.Exists(mdbFullName))
                {
                    if (new FileInfo(pdbFullName).LastWriteTime < new FileInfo(mdbFullName).LastWriteTime)
                    {
                        continue;
                    }
                }

                VsOutputPane.LogMessage("Converting '" + outputFileName + "'.");
                var psi = new ProcessStartInfo(pdb2mdb, "\"" + Path.Combine(outputDir, outputFileName) + "\"");
                System.Diagnostics.Process.Start(psi);
            }
            VsOutputPane.LogMessage("Done.");
        }