Upgrading to mono 5.20.1.34 according to this link fixes the issue for me.
Used the following commands
apt-get remove mono-runtime
Edit your /etc/apt/sources.list.d/mono-official-stable.list and change:
deb https://download.mono-project.com/repo/ubuntu stable-bionic main
to:
deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/5.20.1.34 main
apt-get update -y
apt install mono-devel -y