Example #1
0
        static void Listing(List <string> toolNames, string vsRoot)
        {
            Common.Message("Listing for visual studio " + Path.GetFileName(vsRoot));

            IList <CodeToolInfo> tools = CodeToolInfo.ReadAllFromRegistry(UpdateMode.Normal, vsRoot);

            foreach (CodeToolInfo tool in tools)
            {
                if (toolNames.Count == 0 || toolNames.Contains(tool.ToolName))
                {
                    tool.Show();
                }
            }
        }
Example #2
0
        static void Update(UpdateMode updateMode, List <string> toolNames, string vsRoot)
        {
            Common.Message("Update for visual studio " + Path.GetFileName(vsRoot));

            IList <CodeToolInfo> tools = CodeToolInfo.ReadAllFromRegistry(updateMode, vsRoot);

            foreach (CodeToolInfo tool in tools)
            {
                if (toolNames.Count == 0 || toolNames.Contains(tool.ToolName))
                {
                    tool.UnInstall();                     // only runs if necessary
                }
            }
            foreach (CodeToolInfo tool in tools)
            {
                if (toolNames.Count == 0 || toolNames.Contains(tool.ToolName))
                {
                    tool.Install();                     // only runs if necessary
                }
            }
        }