.NET VB Visual Studio and MonoDevelop

I saw a pretty interesting case today. My lovely girlfriend is studying for computer science and while doing VisualBasic class, she created a software in Vistual Studio for her father. Later on we put Fedora on her laptop and now she needed to do some improvements in the application. We got MonoDevelop with mono-basic compiler and opened the project of VisualStudio on MonoDevelop. All seemed fine, but the code would not compile.

Next to the line of code “Me.MainForm = Global.OurAppName.Form1” it was giving an error: “OurAppName.Form1′ is a type and cannot be used as an expression. (VBNC30691)“. Note that this line of code was produced by VisualStudio. The issue has to do with object creation. While normal syntax would be “objectVar = New ClassName“, the actual code was of “objectVar = ClassName” format and obviously was giving compile error. Converting a code to “Me.MainForm = New Global.OurAppName.Form1” solved the issue perfectly well, but a question is: how an IDE would do such a mistake and why it would compile under windows?

4 thoughts on “.NET VB Visual Studio and MonoDevelop”

  1. You’re a champ. Just got my project working on Debian using this, plus a module with Sub Main calling ShowDialog() on the main form.

    I think the real question is ‘Why is MonoDevelop still a full version number behind on Debian?’

  2. I am working with the Raspberry Pi and am just learning how to get my VB.Net resources onto the Debian/Linux platform. The error (VBNC30691) stumped me. Thanks for the resolution.

Leave a Reply