Ejemplo n.º 1
0
 // this method needs to be static as it is called from the timer, when the core wizard has been disposed already.
 private static void OpenFile(string targetFile, Project project, IDeveroomLogger logger)
 {
     try
     {
         var projectItem = VsUtils.FindProjectItemByFilePath(project, targetFile);
         if (projectItem != null)
         {
             //projectItem.Open();
             project.DTE.ExecuteCommand("File.OpenFile", targetFile);
             logger.LogVerbose($"File opened: {targetFile}");
         }
     }
     catch (Exception ex)
     {
         logger.LogDebugException(ex);
     }
 }
Ejemplo n.º 2
0
 private void OpenFile(string targetFile, Project project)
 {
     try
     {
         var projectItem = VsUtils.FindProjectItemByFilePath(project, targetFile);
         if (projectItem != null)
         {
             //projectItem.Open();
             project.DTE.ExecuteCommand("File.OpenFile", targetFile);
             Logger.LogVerbose($"File opened: {targetFile}");
         }
     }
     catch (Exception ex)
     {
         Logger.LogException(MonitoringService, ex);
     }
 }