compiled & installed mono 6,12,0.199 on RHEL8, vbc complains, csc succeeds

26 views Asked by At

Trying to compile hello.vb:

Imports System

Module Module1
  Sub Main()
    Console.WriteLine("Hello world")
  End Sub
End Module
$ vbc hello.vb
Microsoft (R) Visual Basic Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation.  All rights reserved.

vbc : error BC2017: could not find library 'Microsoft.VisualBasic.dll'

However - the library file does exist under /usr/local/lib/mono/4.5-api

The same program in C#

using System;

public class HelloWorld {
  public static void Main(string[] args) {
    Console.WriteLine("Hello world");
  }
}
$ csc hello.cs
<elided>
$ mono hello.exe
Hello world

The build & install of mono was a simple

./configure --prefix=/usr/local
make
make check
make install

What am I doing wrong?

I was expecting the vb compiler to work for simple programs.

0

There are 0 answers