コード例 #1
0
 void CreateConsoleHost()
 {
     if (powerShellDetection.IsPowerShell2Installed())
     {
         consoleHost = new PackageManagementConsoleHost(solution, registeredRepositories, packageEvents);
     }
     else
     {
         consoleHost = new PowerShellMissingConsoleHost();
     }
 }
コード例 #2
0
 bool ShouldRunActionInConsole(ProcessPackageAction action)
 {
     if (action.HasPackageScriptsToRun())
     {
         if (powerShellDetection.IsPowerShell2Installed())
         {
             return(true);
         }
         else
         {
             ReportPowerShellIsNotInstalled();
         }
     }
     return(false);
 }