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.
Running a diff with another similar project helped me fix this issue.