[MonoDevelop] StartupHandler

Steven Schermerhorn stevens at ischyrus.com
Wed Jan 19 01:11:57 EST 2011


I am trying to create an Addin that runs at startup and am having some problems.

I set breakpoints in each of the methods below, however they don't get hit however my extension does appear in the Addins dialog as being installed and enabled.

Here is my extension:

[assembly: Addin("MyTestExtension")]
namespace MyTestExtension
{
	[Extension("/MonoDevelop/Ide/StartupHandlers")]
	class MyTest : CommandHandler
	{
		
		public MyTest()
		{
			System.Console.WriteLine("MyTest creatd!");
		}
		
		protected override void Run ()
		{
			System.Console.WriteLine("MyTest ran!!");
			System.Diagnostics.Debugger.Break();
			int i = 0;
			i += 3;
			
			base.Run ();
		}
		
		protected override void Run (object state)
		{
			int i = 0;
			i += 3;
		}
	}
}

I also tried using a config file rather than attributes, however get the same result:

<Addin id="MyTestExtension"
	   namespace="MonoDevelop"
	   name="MyTestExtension"
	   author="Steven Schermerhorn"
	   copyright="MIT X11"
	   url="http://sample.com"
	   description="MyTestExtension"
	   category="IDE extensions"
	   version="2.6">
	
	<Extension path = "/MonoDevelop/Ide/StartupHandlers">
		<Class class="MyTestExtension.MyTest" />
	</Extension>
</Addin>

I am running this against the latest monodevelop. I have attempted using my own build of Mono.Addins so that I can step through what is going on but haven't gotten that far yet.

Can anyone see anything obviously wrong?

-Steven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110118/9be3f60c/attachment-0001.html 


More information about the Monodevelop-list mailing list