# Technically can a plugin be written in VB.Net?

**URL:** <https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709>\
**Category:** MW Plugin developers\
**Created:** [August 26, 2020, 3:50pm UTC](https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709 "2020-08-26T15:50:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trauken](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@Trauken](https://mapwindow.discourse.group/u/Trauken)\
**Post date:** [August 26, 2020, 3:50pm UTC](https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709/1 "2020-08-26T15:50:00Z")

</div>

I am a long time MW user along side my ArcGIS install. Migrating to **MW5** has been slightly (OK, very) challenging. I wrote my first Plugin for 4.8.8 in VB - VS2005 way back in the day. Served us well for years. I have examined the Sample Template plugin you wrote in C# with the aim of migrating the functionality of our old dll to MW5. I was able to convert your sampledockwindow code to VB VS2019 (Net Framework 4.6). However, I can not get the dll to be recognized by MapWindow even though it compiled fine-- It is only a Test that adds 4 dummy buttons to the MW5 menu (which I successfully did in the Template example in C#). The DockWindow code was removed in my VB version, as I didn’t need it. Since VB and C# share the same CLR, I may have assumed this should work. If there is some reason why it does not, could you please explain? I can not really change this Company using VB.

I am having trouble with this specifically in InitPlugin C#: [MapWindowPlugin(loadOnStartUp: false)] to VB conversion: \<MapWindowPlugin(loadOnStartUp:=False)\> . The VB code fails with ‘Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.’

---

<div class="post-metadata">

**Author:** ![Trauken](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@Trauken](https://mapwindow.discourse.group/u/Trauken)\
**Post date:** [September 2, 2020, 7:47pm UTC](https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709/2 "2020-09-02T19:47:02Z")

</div>

After more experimenting I have lost hope that it can work in VB-- as soon as the “=” is added (by a code converter), VB IDE acts as if a value (false) is being assigned to a read only property and throws an error. And of course commenting out the statement results in Map Window unable to load and list it. I cannot see where the line can be written differently as I am new to this type of statement in VB. C# code works fine. I like how simple Map Window 5 Plugins are but it would be nice to assign and configure plugins right in Map Window itself as long as the dll is in the plugins directory.  
Still would be nice to have confirmation or comment from any MW Team member, lol.

---

<div class="post-metadata">

**Author:** ![Trauken](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@Trauken](https://mapwindow.discourse.group/u/Trauken)\
**Post date:** [September 3, 2020, 3:15pm UTC](https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709/3 "2020-09-03T15:15:19Z")

</div>

More Experimenting… fixed it with \<MapWindowPlugin(False)\> …Allowed it to be recognized as a Plugin but then Init Menu failed so still not loading. Stand by.

---

<div class="post-metadata">

**Author:** ![Trauken](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@Trauken](https://mapwindow.discourse.group/u/Trauken)\
**Post date:** [September 3, 2020, 5:07pm UTC](https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709/4 "2020-09-03T17:07:11Z")

</div>

Ok, that is resolved, the VB Plugin loaded and created My Menu and Toolbar Buttons! So Answer to the Thread is yes it can be Written in [VB.Net](http://VB.Net). Not sure if fleshing out the code will bare this out but I hope so.

Thank you ME! I’ve been invaluable.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 5, 2022, 3:09pm UTC](https://mapwindow.discourse.group/t/technically-can-a-plugin-be-written-in-vb-net/709/5 "2022-01-05T15:09:07Z")

</div>


