Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find type 'Microsoft.Office.Tools.Ribbon.RibbonTab' error prevents designer from opening

I have a VSTO for Excel project with a custom ribbon tab. The solution builds without errors. I can run the solution. It launches Excel and displays the custom ribbon tab and task pane without any issue.

When I try to open the designer for the custom ribbon tab in Visual Studio 2019, I get the following error:

Could not find type 'Microsoft.Office.Tools.Ribbon.RibbonTab'. Please make sure the assembly that contains this type is referenced. If this type is a part of a development project, make sure that the project has been successfully built using the settings for your current platform or Any CPU.

  • The solution builds and runs without any issues.
  • When I expand the error info, There is no stack trace or error line information available for this error.
  • The build settings are set to 'Any CPU'.
  • The assemblies that contain 'Microsoft.Office.Tools.Ribbon.RibbonTab' are included in the project references. These are Microsoft.Office.Tools.Common and Microsoft.Office.Tools.Common.v4.0.Utilities.
  • I have tried to Clean, Rebuild, and Restart Visual Studio 2019. This had no effect.
  • I could not find anything definitive when I Check Windows Forms Design-Time error list.

Would anyone know how to address this issue so that I can open the custom ribbon in the designer?

Is VSTO still supported by Microsoft? All documentation appears to be several years old.

like image 326
Doug Kimzey Avatar asked Dec 28 '25 16:12

Doug Kimzey


1 Answers

This is a Visual Studio issue, not a C#/Build/DLL linkage issue.

Make sure your Visual Studio setup (do the Modify in the installer (#1) if already installed) has these two components checked:

Visual Studio Modification-VSTO


Is VSTO still supported by Microsoft?

They are moving to an online office365 addin (my words) type VSTO. As to new features, not recently. One can still put in a Visual Studio support ticket if you have the right subscription.


I have never had any issues with ribbons, but sometimes the winforms res files in designer do not show and I use the JetBrains Rider editor to view those controls when VS fails.

like image 152
ΩmegaMan Avatar answered Dec 31 '25 00:12

ΩmegaMan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!