/// <summary> /// This function is the callback used to execute the command when the menu item is clicked. /// See the constructor to see how the menu item is associated with this function using /// OleMenuCommandService service and MenuCommand class. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event args.</param> private void OnUpdateNuGetPackages(object sender, EventArgs e) { NuGetServices.UpdateNuGetPackages(true); //NS_TRD.Tasks.Task.Factory.StartNew(() => // NuGetHelper.UpdateNuGetPackages(true), // NS_TRD.Tasks.TaskCreationOptions.LongRunning); }
/// <summary> /// Initialization of the package; this method is called right after the package is sited, so this is the place /// where you can put all the initialization code that rely on services provided by VisualStudio. /// </summary> protected override void Initialize() { GeneralUtils.Initialize(this); ProjectUtilities.Initialize(this); NuGetServices.Initialize(this); SwitchToDebugCommand.Initialize(this); UpgradeNuGetCommand.Initialize(this); UpgradeNuGetBetaCommand.Initialize(this); base.Initialize(); }
/// <summary> /// This function is the callback used to execute the command when the menu item is clicked. /// See the constructor to see how the menu item is associated with this function using /// OleMenuCommandService service and MenuCommand class. /// </summary> public static void Switch() { OperationContext context = NuGetServices.LoadNuGetPackages(false); if (context == null) { return; } var inDebugMode = context.Projects.IsSolutionInDebugMode(); if (!inDebugMode) { SwitchToDebugMode(context); } else { SwitchToNuGetMode(context); } }
/// <summary> /// This function is the callback used to execute the command when the menu item is clicked. /// See the constructor to see how the menu item is associated with this function using /// OleMenuCommandService service and MenuCommand class. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event args.</param> private void OnUpdateNuGetPackages(object sender, EventArgs e) { NuGetServices.UpdateNuGetPackages(false); }