Search code examples
vb.netmonomonodevelop

monodevelop won't compile VB code


I wanted to have a look at monodevelop, thinking about possible moving in-house projects written in .Net from Windows to Linux.

I installed mono-complete 4.0.2 and monodevelop 5.9.4 on a clean Ubuntu 14.04 VM, I assume those are the latest/current versions.

Now C# works, but I can't get it to compile any VB code.

Any new VB project I create first refuses to load. Quickly found (Google) that the mono VB compiler doesn't support framework 4 or higher yet, but the project template generates projects targeted at 4.5. After I manually edit the project file to target 3.5, 3.0 or 2.0, the projects load (this works for console as well as GTK projects).

But when I try to compile it then, no own code added yet, just the auto-generated base code, it just fails without any error messages.

Build output:

Building: VbHelloConsoleWorld (Debug|x86)

Build started 7/3/2015 10:42:20 AM.
__________________________________________________
Project "/home/luc/projects/VbHelloConsoleWorld/VbHelloConsoleWorld.vbproj"  (Build target(s)):

Target PrepareForBuild:
Configuration: Debug Platform: x86

Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Done building project "/home/luc/projects/VbHelloConsoleWorld/VbHelloConsoleWorld.vbproj".-- FAILED

Build FAILED.
 0 Warning(s)
 0 Error(s)

Time Elapsed 00:00:00.0438100

---------------------- Done ----------------------

Build successful.

Am I still missing some dependencies? Other stuff that must be fixed before a VB project will work?


Solution

  • For some reason building VB.NET with MSBuild does not work.

    To workaround this you can disable the use of the MSBuild build engine. Go into project options, Build - General and uncheck Use MSBuild build engine. Then the project should compile and generate an output assembly.