VS 2008 : Plugin Pop-up issue
While adding a pop-up to a plugin, designed in VS 2008, one of the commonly faced problem is:
Error 1 The best overloaded method match for 'EnvDTE80.Commands2.AddNamedCommand2(EnvDTE.AddIn, string, string, string, bool, object, ref System.Array, int, int, EnvDTE80.vsCommandControlType)' has some invalid arguments C:Puneet GhanshaniDesktop ApplicationsMyAddin2MyAddin2Connect.cs 40 24 MyAddin2
Error 2 Argument '7': cannot convert from 'ref object[]' to 'ref System.Array' C:Puneet GhanshaniDesktop ApplicationsMyAddin2MyAddin2Connect.cs 40 140 MyAddin2
Resolution:
Change:
object []contextGUIDS = new object[] { };
to:
System.Array contextGUIDS = new object[] { };
and it should compile & execute perfectly.