{"id":440,"date":"2007-06-03T20:55:27","date_gmt":"2007-06-03T20:55:27","guid":{"rendered":"http:\/\/neosmart.net\/blog\/2007\/sharpdevelop-invalid-eventmemberspecifier-error-solution\/"},"modified":"2013-08-26T18:16:27","modified_gmt":"2013-08-26T23:16:27","slug":"sharpdevelop-invalid-eventmemberspecifier-error-solution","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/sharpdevelop-invalid-eventmemberspecifier-error-solution\/","title":{"rendered":"SharpDevelop &#8220;invalid EventMemberSpecifier&#8221; Error &amp; Solution"},"content":{"rendered":"<h3>The Problem<br \/>\n<\/h3>\n<p><a href=\"http:\/\/www.icsharpcode.net\/\" rel=\"follow\">SharpDevelop<\/a>, for those of you that haven&#8217;t heard of it, is a very light-weight open source alternative to Visual Studio 2005. It doesn&#8217;t have all the frills and features that Microsoft&#8217;s professional IDE does, but in exchange it gives you much less bloat, faster speeds, and quite a few nifty built-in tools like SVN integration, FxCop auto-checking, code profiling, language conversion (C# &lt;-&gt; VB.NET &lt;-&gt; Boo#), and a bit more &#8211; but it has its drawbacks, too.\n<\/p>\n<p>SharpDevelop is intended to be a 100% open source drop-in replacement for the Visual Studio IDE on Windows (there&#8217;s MonoDevelop for Linux if you like), and for the most part, it works just fine. But once in a while, an odd quirk pops up that&#8217;s rather obvious &amp; common&#8230; yet unsolved and makes us wonder.\n<\/p>\n<p><!--more--><\/p>\n<p>Anyway, if you&#8217;re getting any errors like:\n<\/p>\n<p><code>Syntax errors in Form1.vb:<br \/> -- line 8900 col 121: invalid EventMemberSpecifier<\/code><\/p>\n<p>Then you are suffering from such an oversight. It turns out that Visual Studio 2005 uses &#8220;Handles Me.xxxxx&#8221; to assign event handlers to form components in Visual Basic 2005. Now it&#8217;s not very clear what exactly is &#8220;right&#8221; per-say here, but SharpDevelop doesn&#8217;t recognize this as valid code, and instead requires &#8220;Handles MyBase.xxxxx&#8221; appended to functions that handle form components.\n<\/p>\n<h3>The Solution<br \/>\n<\/h3>\n<p>When you access the &#8220;Designer&#8221; tab you&#8217;ll be presented with the message above. To fix it, simply switch to the code-behind display by selecting the appropriate tab at the bottom, then press &#8220;ctrl+f&#8221; to search for code. Switch to the &#8220;replace&#8221; tab, and type in: <code>Handles Me.<\/code> and in the &#8220;replace&#8221; section enter <code>Handles MyBase.<\/code> and click &#8220;replace all.&#8221;\n<\/p>\n<p>Luckily Visual Studio 2005 is compatible with both &#8220;MyBase&#8221; and &#8220;Me&#8221; when referring to the parent form in Visual Basic 2005, so with this simple change you should be able to freely switch back and forth between the two without much trouble.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Problem SharpDevelop, for those of you that haven&#8217;t heard of it, is a very light-weight open source alternative to Visual Studio 2005. It doesn&#8217;t have all the frills and features that Microsoft&#8217;s professional IDE does, but in exchange it &hellip; <a href=\"https:\/\/neosmart.net\/blog\/sharpdevelop-invalid-eventmemberspecifier-error-solution\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[354,56,415,326,164],"class_list":["post-440","post","type-post","status-publish","format-standard","hentry","category-software","tag-net-framework","tag-bugs","tag-sharpdevelop","tag-visual-basic","tag-visual-studio"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-76","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=440"}],"version-history":[{"count":1,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":2387,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/440\/revisions\/2387"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}