C# Office 2010加载项自定义选项卡/组包含不需要的命令

C# Office 2010加载项自定义选项卡/组包含不需要的命令,c#,excel,ms-office,add-in,ribbon,C#,Excel,Ms Office,Add In,Ribbon,我继承了一个Excel2010VSTO,它在自己的选项卡下有一个按钮来启动一些代码(我也是VS和C的新手) 我的问题是,当我部署它时,会在“菜单命令”和“工具栏命令”组下显示额外的命令;这些应用属于其他具有Excel集成的应用,但不属于它们自己的选项卡/组 我在解决方案中搜索了对菜单和工具栏的引用,但在任何地方都看不到它们 功能区上的我的选项卡是 文件|主页|插入|页面布局|公式|数据|查看|开发人员| Boyce Tools 2(我的加载项)|其他加载项1 |其他加载项2 |其他加载项3 |其

我继承了一个Excel2010VSTO,它在自己的选项卡下有一个按钮来启动一些代码(我也是VS和C的新手)

我的问题是,当我部署它时,会在“菜单命令”和“工具栏命令”组下显示额外的命令;这些应用属于其他具有Excel集成的应用,但不属于它们自己的选项卡/组

我在解决方案中搜索了对菜单和工具栏的引用,但在任何地方都看不到它们

功能区上的我的选项卡是

文件|主页|插入|页面布局|公式|数据|查看|开发人员| Boyce Tools 2(我的加载项)|其他加载项1 |其他加载项2 |其他加载项3 |其他加载项4|

我已经为选项卡和组“Boyce Tools 2”指定了名称,所以不确定这些其他命令是如何实现的?是否有可能其他加载项只是默认为第一个非office MS one的选项卡

Ribbon.Designer.cs

namespace ReportFramework
{
    partial class Ribbon : Microsoft.Office.Tools.Ribbon.RibbonBase
    {
        /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    public Ribbon()
        : base(Globals.Factory.GetRibbonFactory())
    {
        InitializeComponent();
    }

    /// <summary> 
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Component Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        this.tabBoyceTools = this.Factory.CreateRibbonTab();
        this.grpBoyceCAL = this.Factory.CreateRibbonGroup();
        this.btnGenerateCAL = this.Factory.CreateRibbonButton();
        this.tabBoyceTools.SuspendLayout();
        this.grpBoyceCAL.SuspendLayout();
        // 
        // tabBoyceTools
        // 
        this.tabBoyceTools.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
        this.tabBoyceTools.Groups.Add(this.grpBoyceCAL);
        this.tabBoyceTools.Label = "Boyce Tools 2";
        this.tabBoyceTools.Name = "tabBoyceTools";
        // 
        // grpBoyceCAL
        // 
        this.grpBoyceCAL.Items.Add(this.btnGenerateCAL);
        this.grpBoyceCAL.Label = "CAL";
        this.grpBoyceCAL.Name = "grpBoyceCAL";
        // 
        // btnGenerateCAL
        // 
        this.btnGenerateCAL.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
        this.btnGenerateCAL.Label = "Format CAL";
        this.btnGenerateCAL.Name = "btnGenerateCAL";
        this.btnGenerateCAL.OfficeImageId = "MacroPlay";
        this.btnGenerateCAL.ShowImage = true;
        this.btnGenerateCAL.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnGenerateCAL_Click);
        // 
        // Ribbon
        // 
        this.Name = "Ribbon";
        this.RibbonType = "Microsoft.Excel.Workbook";
        this.Tabs.Add(this.tabBoyceTools);
        this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.Ribbon_Load);
        this.tabBoyceTools.ResumeLayout(false);
        this.tabBoyceTools.PerformLayout();
        this.grpBoyceCAL.ResumeLayout(false);
        this.grpBoyceCAL.PerformLayout();

    }

    #endregion

    internal Microsoft.Office.Tools.Ribbon.RibbonTab tabBoyceTools;
    internal Microsoft.Office.Tools.Ribbon.RibbonGroup grpBoyceCAL;
    internal Microsoft.Office.Tools.Ribbon.RibbonButton btnGenerateCAL;
}

partial class ThisRibbonCollection
{
    internal Ribbon Ribbon
    {
        get { return this.GetRibbon<Ribbon>(); }
    }
}
命名空间报告框架
{
分部类功能区:Microsoft.Office.Tools.Ribbon.RibbonBase
{
/// 
///必需的设计器变量。
/// 
private System.ComponentModel.IContainer components=null;
公共丝带()
:base(Globals.Factory.GetRibbonFactory())
{
初始化组件();
}
///  
///清理所有正在使用的资源。
/// 
///如果应释放托管资源,则为true;否则为false。
受保护的覆盖无效处置(布尔处置)
{
if(处理和(组件!=null))
{
组件。Dispose();
}
基地。处置(处置);
}
#区域组件设计器生成的代码
/// 
///设计器支持所需的方法-不修改
///此方法的内容与代码编辑器一起使用。
/// 
私有void InitializeComponent()
{
this.tabBoyceTools=this.Factory.CreateRibbonTab();
this.grpboyecal=this.Factory.CreateRibbonGroup();
this.btnGenerateCAL=this.Factory.CreateRibbonButton();
this.tabBoyceTools.SuspendLayout();
this.grpbyccal.SuspendLayout();
// 
//tabBoyceTools
// 
this.tabBoyceTools.ControlId.ControlIdType=Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
this.tabBoyceTools.Groups.Add(this.grpboyeccal);
this.tabBoyceTools.Label=“Boyce工具2”;
this.tabBoyceTools.Name=“tabBoyceTools”;
// 
//GRPBOyccal
// 
this.grpbyccal.Items.Add(this.btn通用);
this.grpboyecal.Label=“CAL”;
this.grpboyecal.Name=“grpboyecal”;
// 
//一般的
// 
this.btnGenerateCAL.ControlSize=Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.btnGenerateCAL.Label=“Format CAL”;
this.btnGenerateCAL.Name=“btnGenerateCAL”;
this.btnGenerateCAL.OfficeImageId=“MacroPlay”;
this.btnGenerateCAL.ShowImage=true;
this.btnGenerateCAL.Click+=新建Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnGenerateCAL\u Click);
// 
//丝带
// 
this.Name=“Ribbon”;
this.RibbonType=“Microsoft.Excel.Workbook”;
this.Tabs.Add(this.tabBoyceTools);
this.Load+=新的Microsoft.Office.Tools.Ribbon.ribbonieventhandler(this.Ribbon\u Load);
this.tabBoyceTools.ResumeLayout(false);
这个.tabBoyceTools.PerformLayout();
此.grpbyccal.ResumeLayout(false);
此.grpbyccal.PerformLayout();
}
#端区
内部Microsoft.Office.Tools.Ribbon.RibbonTab选项卡工具;
内部Microsoft.Office.Tools.Ribbon.RibbongGroup GRPBOyccal;
内部Microsoft.Office.Tools.Ribbon.Ribbon按钮BTN通用;
}
部分类ThisRibbonCollection
{
内部带状
{
获取{返回this.GetRibbon();}
}
}
}

只有在调试模式下运行时,开发人员计算机上才会出现问题

在发布模式或实际安装的VSTO版本中,这不是问题