0

I used to be able to run vb.net apps using just this

apt-get install mono-runtime
apt-get install mono-vbnc

But I now need at least 2.8.0 to run a certain app that has already been compiled on windows. I have the option between the following OS's

ubuntu-12.04-x86
ubuntu-12.04-x86_64 
ubuntu-12.10-x86
ubuntu-12.10-x86_64
centos-5-x86
centos-5-x86_64
centos-5-elastix_2.0.1_amd64
centos-6-x86
centos-6-x86_64
debian-6.0-x86
debian-6.0-i386-minimal
debian-6.0-x86_64
debian-6.0-amd64-minimal
debian-7-x86
debian-7.0-x86_64

I've tried the following on multiple versions of ubuntu.

#!/bin/bash

echo Checking for prerequisites. Please enter password if prompted.

sudo apt-get update
sudo apt-get install libpng3 libpng3-dev libtool libtiff4 libtiff4-dev libexif12 libexif-dev libgif4 libgif-dev libpango1.0-dev libatk1.0-dev bison automake autoconf make gcc gtk-sharp2 build-essential xorg-dev libfreetype6 libfontconfig libfontconfig-dev gettext libglib2.0-dev git mono-complete libjpeg-dev

echo Downloading latest build of mono...

git clone git://github.com/mono/mono.git

echo Navigating to mono install directory.

cd mono

echo Building mono from source...

./autogen.sh --prefix=/usr/local
make

echo Installing mono, running with sudo

sudo make install

echo Done!

Checking the mono version says it has worked, but I cant actually run the app due to this error:

The assembly mscorlib.dll was not found or could not be loaded. It should have been installed in the 'usr/lib/mono/4.5/mscorlib.dll'.

Which OS should I use and how can I install mono 2.8.0 or later to run a C# app which has been compiled on windows?

user2005848
  • 396
  • 5
  • 18
  • perhaps helpful http://stackoverflow.com/questions/10490155/unable-to-run-net-app-with-mono-mscorlib-dll-not-found-version-mismatch – kenny Jun 17 '14 at 03:11
  • The number one answer was to run apt-get install mono-complete, That does not work because a newer version is installed. – user2005848 Jun 17 '14 at 05:42

1 Answers1

0
  1. Build a clean Linux OS from ISO, such as Ubuntu 12.04.
  2. Install the stable Mono release on it, such as apt-get install mono-complete. This is required to bootstrap the later steps.
  3. Install Git and check out Mono source code, and switch to a stable branch (such as mono-3.2.8-branch).
  4. Build that version of Mono from source and install it.

I don't recommend 3.4.0 or 3.6.0 branch at this moment, as new commits are still added to them in the past week (June 17 today). 3.2.8 is also the Mono version bundled in Ubuntu 14.04.

What you have been wrong is to check out the master branch. No no, that's not a stable release you should use.

Lex Li
  • 60,503
  • 9
  • 116
  • 147