mono: How to change target framework
How do i change mono to run code made for .NET 4 intead of 2? I'm on Ubuntu Server 11.04
mono --version gives me this:
mono --version
Mono JIT compiler version 2.6.7 (Debian 2.6.7-5ubuntu3)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Supposedly i need to run mono 2.8 or greater. So i ran this script (Ubuntu) and rebooted but 开发者_开发问答it still looks like i have the same version.
Edit #1: When i get an error i see this at the bottom:
Version information: Mono Runtime Version: 2.6.7 (Debian 2.6.7-5ubuntu3); ASP.NET Version: 2.0.50727.1433
Edit #2: When i try to install the mono-parallel 2.10 deb package as suggested by skolima's answer and here. I get the following error:
dpkg: error processing mono-2.10.1-parallel-environment.deb (--install): package architecture (amd64) does not match system (i386) Errors were encountered while processing: mono-2.10.1-parallel-environment.deb
But i don't see any alternate downloads for i386.
The script you have used installs additional Mono environment in /opt/mono-2.10 . To use it, you would have to follow instructions from http://www.mono-project.com/Parallel_Mono_Environments . In short:
- create a file ~/mono-2.10-env with the following contents:
#!/bin/bash MONO_PREFIX=/opt/mono-2.10 GNOME_PREFIX=/usr export DYLD_LIBRARY_FALLBACK_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_FALLBACK_PATH export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig export PATH=$MONO_PREFIX/bin:$PATH PS1="[mono2.10] \w @ "
- source it in your shell
source ~/mono-2.10-env
and the current shell session will be running the new Mono. Remember that it is installed outside the normal tree, and apt
will not update it. In general, I'd recommend choosing a distro which provides packages that aren't two years old. Also, this is a duplicate of https://askubuntu.com/questions/5304/upgrading-to-latest-stable-mono .
精彩评论