none
When looking at Ribbon Designer, receiving the error: Specified argument was out of the range of valid values. Parameter name: version" RRS feed

  • Question

  • Hello,

    Using VS2010, I had an Excel 2010 addin that was just fine. Now when I go to look at the ribbon designer, or even create a new Ribbon from scratch, I am getting this error: Specified argument was out of the range of valid values. Parameter name: version

    Any ideas what could be causing this? I even tried a brand new Project, I didn't add any code, and added a Ribbon and still got this error.

    Thank you.

    ~J

    Monday, September 22, 2014 8:21 PM

Answers

  • The Ribbon designer in Visual Studio 2010 can work only with Office 2007 or 2010. See Ribbon Designer for more information.

    You need to install the recent version of Visual Studio (2012 or 2013) and migrate your projects there or install the previous Office versions (2007 or 2010).

    • Marked as answer by Jenna_Fire Tuesday, September 23, 2014 8:33 PM
    Tuesday, September 23, 2014 7:17 PM

All replies

  • Are you targeting the right .NET Framework version? When you start a new project in the New Project Window make sure you are targeting .NET 4 for Excel 2010 and not 4.5



    Tuesday, September 23, 2014 9:11 AM
  • > Now when I go to look at the ribbon designer

    Do you still work in VS2010 with Office 2010 installed? Could you please be more specific?

    Tuesday, September 23, 2014 10:55 AM
  • Yes, I was targeting .NET 4. Also, I am using VS 2010 and have only Office 2013 installed.

    Just to be sure I am clear on this, I just did the following steps:

    1. Created a new Excel 2010 Addin project.
    2. Made sure the Project's target is .NET 4. (It was .NET 4 Client Profile, I changed it to just .NET 4)
    3. Added a new Ribbon (Visual Designer). I could see the Designer in VS 2010.
    4. I added just a Group name to the tab.
    5. I tried to run the project, but got the "Cannot debug project because required version of MS Office application is not installed."
    6. I changed to CSPROJ file to show the OfficeVersion = 15.
    7. Ran the Project and Excel opened.
    8. When I closed Excel, I no longer saw the Designer. The "Specified argument..." error message was now appearing.
    9. As a guess, I then changed the Microsoft.Office.Interop.Excel reference to Office 2013. Now the error is: 
      The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: Ribbon1 --- The base class 'Microsoft.VisualStudio.Tools.Office.Ribbon.View.GenericRibbonView' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. ThisRibbonCollection --- The base class 'Microsoft.Office.Tools.Ribbon.RibbonCollectionBase' cannot be designed. 

    I hope that sheds some light on it.

    Thank you for all your assistance.

    Tuesday, September 23, 2014 5:11 PM

  • Do you still work in VS2010 with Office 2010 installed? Could you please be more specific?

    I am working in VS2010 with Office 2013 installed. I no longer have Office 2010 installed.
    Tuesday, September 23, 2014 5:12 PM
  • The Ribbon designer in Visual Studio 2010 can work only with Office 2007 or 2010. See Ribbon Designer for more information.

    You need to install the recent version of Visual Studio (2012 or 2013) and migrate your projects there or install the previous Office versions (2007 or 2010).

    • Marked as answer by Jenna_Fire Tuesday, September 23, 2014 8:33 PM
    Tuesday, September 23, 2014 7:17 PM
  • The Ribbon designer in Visual Studio 2010 can work only with Office 2007 or 2010. See Ribbon Designer for more information.

    You need to install the recent version of Visual Studio (2012 or 2013) and migrate your projects there or install the previous Office versions (2007 or 2010).

    Finally, some clarity! Thank you for the advice and link.
    Tuesday, September 23, 2014 8:35 PM