一、什么是Mono
Mono 是一种开源的跨平台的,作用与.NET Framework相似程序。
二、为什么使用Mono
Wine能够利用Mono来实现运行Windows依赖.NET 的应用程序。
由于x64架构的Linux安装Wine默认安装Wine64,而x64对于.NET 4的支持一直为人所诟病。
唯一能够同时支持x64,x86的.NET Mono应运而生。
安装流程转自winehq wiki:
Installing
For Wine releases 1.5.3 and later, the Wine-Mono package is recommended. For earlier versions, an official Windows release of Mono 2.10 is recommended.
Wine 1.5.6 and later will install Wine-Mono automatically as needed. It will search for the MSI in the following locations:
- The Unix directory stored in the "MonoCabDir" value at HKCU\Software\Wine\Dotnet.
- /usr/share/wine/mono, or possibly some substitution for /usr if Wine was installed to a different location.
- wine_build_directory/../mono, if Wine is being run from a build tree.
- Download from http://dl.winehq.org/wine/wine-mono/.
Unlike gecko, there is only one package containing the code for both x86 and x86_64, as most of the code does not depend on the architecture.
The Mono package should always be removed before installing native .NET. This can be done with the following command-line:
$ wine uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}'
In a 64 bit wineprefix, substitute wine64 for wine in the above command