Sunday, December 21, 2014

Getting VB.NET to work in MonoDevelop [tested in Ubuntu]

Hey follks,

Kinda strange to crash with something totally new to the blog but wth :D. Okay some background first, I recently had to go FULL time ubuntu [not by choice], but because i screwed up my Windows partition. Any how after much more blaaaaas , i wanted to develop C#, VB and ASP stuff for .net framework 4 in UBUNTU.
Strange things i know, but believe me a lot of ppl want to do those. So just like everyone else i searched google, Mono was promising and installed it. [ubuntu 11.10].

When i started Mono, I was really impressed, hell they almost ported VS2010 to ubuntu, the C# features worked great but got dissapointed when i came to the VB.NET section.


When i try to compile the VB.NET code, i get 1 error and 8 warning
8 warnings : the Assemblies not available for some bla
                    cannot find the import GTK
1 error :       Cannot find the 'Windo' class

So there i was searching the internet again and again

Solutions that i found on internet but did not work for me

1) Changing the project type for VS2008 from VS2008
Goto Edit->Preferences->Load/Save
Select VisualStudio 2008 from the dropdown
And recreate a VB.NET project

Well some said it worked but not for me :/

2) Changing the .Net framewrok type
Double click the Porject from Solution Explorer
Build -> General
Runtime Version : Mono / .Net 2.0

Again did not work for me.

And I noticed that the references of the project are all marked red, unlike when i opened a C# project, so after some seriously wasting for time i finally found this.


1) Double click References. You get Edit references dialog
2) Goto .Net Assembly tab
3) Now we are going to add all the DLL files added as references already [but not working] manually again
4) Goto /usr/lib/mono/gac [this is where all the assemblies are]
5) First we'll add the atk-sharp library
     Select atk-sharp->some-directory-with-numbres->atk-sharp.dll
     a reference will be added
6) Repeat the above for other references as well


Now try to compile the project. =VIOLA= :D
working like a baby.
I dont know why those happend but it's working finally, and its really enough for mt

Ill update for any further errors

Cyah all

No comments:

Post a Comment