While learning on working with the ribbon UI in my outlook addin(VS2010), I deleted and added ribbon items several times. Since yesterday, when I am adding a ribbon item, some of the autogenerated code is not compiling.
partial class ThisRibbonCollection
{
internal MyRibbon MyRibbon
{
get { return this.GetRibbon<MyRibbon>(); }
}
}
The error thrown is
'MyAddin.ThisRibbonCollection' does not contain a definition for 'GetRibbon' and no extension method 'GetRibbon' accepting a first argument of type 'MyAddin.ThisRibbonCollection' could be found (are you missing a using directive or an assembly reference?)
So, to get rid of this, I commented out the code block and it compiled. Now, the issue I am facing is that I cannot access the ribbon via the Globals object as mentioned here.Access Ribbons at runtime . I tried "grepping" the entire solution for ribbon specific code and deleted them and tried adding a ribbon item but the issue persists.
I can access my addin from the controls on my ribbon but the reverse is not happening.
That error may be is because you create the ribbon in a folder, creating a new namespace.
Easy solution: delete the namespace name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With