protected override void Execute() { // Check if the wsp if newer than dll's, CS and xml files. WSPFileHandle wspHandle = new WSPFileHandle(this.DTEInstance); WSPBuilderHandle wspTool = new WSPBuilderHandle(this.DTEInstance); DialogResult result = DialogResult.No; if (wspHandle.ProjectFilesHaveChanged()) { result = MessageBox.Show(Strings.NEEDTOREBUILDSOLUTION, Strings.REBUILD, MessageBoxButtons.YesNoCancel); } if (result == DialogResult.Yes) { this.DTEInstance.Application.Solution.SolutionBuild.Build(true); if (this.DTEInstance.Application.Solution.SolutionBuild.LastBuildInfo > 0) { MessageBox.Show("Build Failed. Unable to deploy"); } else { wspTool.RunWSPBuilder(wspHandle.SelectedProject.FullPath, "-BuildWSP true -deploy true"); } } else { if (result == DialogResult.No) { wspTool.Deploy(wspHandle.SelectedProject.FullPath); } } }
protected override void Execute() { // Check if the wsp if newer than dll's, CS and xml files. WSPFileHandle wspHandle = new WSPFileHandle(this.DTEInstance); WSPBuilderHandle wspTool = new WSPBuilderHandle(this.DTEInstance); DialogResult result = DialogResult.No; if (wspHandle.ProjectFilesHaveChanged()) { result = MessageBox.Show("One or more files in the project have changed!\r\n\r\n" + "Do you want to rebuild the project and create a\r\n" + "new solution package (WSP) before upgrading?", "Rebuild!", MessageBoxButtons.YesNoCancel); } if (result == DialogResult.Yes) { this.DTEInstance.Application.Solution.SolutionBuild.Build(true); wspTool.RunWSPBuilder(wspHandle.SelectedProject.FullPath, "-BuildWSP true -Upgrade " + wspHandle.WspFileInfo.Name); } else { if (result == DialogResult.No) { wspTool.Upgrade(wspHandle.SelectedProject.FullPath); } } }
/// <summary> /// Create a deployment folder /// Added Feb 2008 by Tom Clarkson /// </summary> protected override void Execute() { WSPFileHandle wspHandle = new WSPFileHandle(this.DTEInstance); WSPBuilderHandle wspTool = new WSPBuilderHandle(this.DTEInstance); wspTool.RunWSPBuilder(wspHandle.SelectedProject.FullPath, "-BuildWSP true -CreateDeploymentFolder all "); }
protected override void Execute() { // Check if the wsp if newer than dll's, CS and xml files. WSPBuilderHandle wspTool = new WSPBuilderHandle(this.DTEInstance); ProjectPaths projectPaths = new ProjectPaths(this.DTEInstance.SelectedProject); wspTool.Uninstall(projectPaths.FullPath); }
protected override void Execute() { WSPFileHandle wspHandle = new WSPFileHandle(this.DTEInstance); // this.DTEInstance.Application.Solution.SolutionBuild.Build(true); ProjectPaths projectPaths = new ProjectPaths(this.DTEInstance.SelectedProject); WSPBuilderHandle wspTool = new WSPBuilderHandle(this.DTEInstance); wspTool.RunWSPBuilder(wspHandle.SelectedProject.FullPath, "-BuildWSP true -projectassembly \"" + projectPaths.OutputFilePath + "\""); }