/// <summary> /// Adds the new output from the specified parameters /// </summary> public override void Execute() { IVsdDeployable deployable = (IVsdDeployable)SetupProject.Object; IVsdProject project = (IVsdProject)deployable.GetParent(); if (Folder == null) { project.AddOutputGroup(ProjectOutputKind, InputProject.UniqueName); } else // Folder is not null, so let's add it manually { IVsdCollectionSubset plugins = deployable.GetPlugIns(); IVsdProjectOutputPlugIn projectsPlugin = plugins.Item("ProjectOutput") as IVsdProjectOutputPlugIn; projectOutput = (IVsdProjectOutputGroup)DteHelper.CoCreateInstance( this.Site, typeof(VsdProjectOutputGroupClass), typeof(IVsdProjectOutputGroup)); //projectOutput.OutputConfig = null; projectOutput.OutputGroup = ProjectOutputKind; projectOutput.OutputProject = InputProject.UniqueName; projectOutput.ShowKeyOutput = true; projectOutput.Folder = vsdFolder; projectsPlugin.Items.Add(projectOutput); } // Collapse to project definition. UIHierarchyItem uiitem = DteHelper.SelectItem(SetupProject.DTE, DteHelper.BuildPath(SetupProject)); if (uiitem != null) { uiitem.UIHierarchyItems.Expanded = false; } }