Add action in 4.5

I'm writing plugin for Resharper ver. 4.5. But my action is not displayed on the ReSharper menu of Visual Studio menu bar.

I created Action.xml (as embedded resource):

<?xml version="1.0" encoding="utf-8" ?>
<actions>
  <insert group-id="ReSharper" position="last">
  <separator/>
  <action id="MyPlugin" text="My Plugin"/>
  </insert>
</actions>


and wrote class MyPluginAction:
        [ActionHandler("MyPlugin")]

public class FindTextAction : IActionHandler

{

    public bool Update(IDataContext context, ActionPresentation presentation, DelegateUpdate nextUpdate)

    {

          throw new NotImplementedException();

    }

    public void Execute(IDataContext context, DelegateExecute nextExecute)

    {

          throw new NotImplementedException();

    }

}


When i start debugger, i can see that compiled dll is loaded by resharper (menu Resharper -> Plugins...) and Action.xml is parsed (if set unknown attribute, error message box is shown), but "My Plugin" menu item was not created on Visual Studio menu bar.
And commented line with ActionHandlerAttribute results the same effect.
Maybe resharper cannot find FindTextAction class. Is namespace format important? or some thing else...

1 comment

ivan mochalov wrote:

I'm writing plugin for Resharper ver. 4.5. But my action is not displayed on the ReSharper menu of Visual Studio menu bar.

When i start debugger, i can see that compiled dll is loaded by resharper (menu Resharper -> Plugins...) and Action.xml is parsed (if set unknown attribute, error message box is shown), but "My Plugin" menu item was not created on Visual Studio menu bar.
And commented line with ActionHandlerAttribute results the same effect.
Maybe resharper cannot find FindTextAction class. Is namespace format important? or some thing else...


Return true in Update method.

0

Please sign in to leave a comment.