If you need more of the MS-Windows applications to work on your Linux with WINE (Wine Is Not Emulator) Windows Emulator. You will need to install Microsoft .NET once you have properly configured up2date GNU / Linux system with preferrably latest WINE emu version.
There is plenty of forum threads on how .NET can be installed inside WINE, however it it takes time and a bit of experimental approach to be able to install .NET. Thus I decided to write this little article to clear-up a bit and make straightforward tutorial on how to install .NET on Linux / *BSD system.
First as I said you have to had a properly installed and configured WINE. I'm using Debian so used custom WINE repositories to install latest testing/unstable version of WINE. As of time of writting this article my wine version is:
hipo@noah~:$ dpkg -l |grep -i 'wine'
ii playonlinux 3.7.6-1 front-end for Wine
ii wine 1.4-1mcr8.5+1 Windows Compatibility Layer (Binary Emulator and Library)ii wine-gecko 1.4.0-1mcr85+2 Microsoft Windows Compatibility Layer (Web Browser)
With 32 bit of Linux installing DOTNet is easier, but as I'm having 64 bit notebook hardware and thus I needed to have MS .NET on my 64 bit Debian. For some clarity on exact 64 bit kernel version, here is output from uname -a;
hipo@noah:~$ uname -a;
Linux noah 2.6.32-5-amd64 #1 SMP Mon Feb 25 00:26:11 UTC 2013 x86_64 GNU/Linux
With all that said we need to further install winetricks. For those unfamiliar with winetricks, here is quote from there wiki;
winetricks is a helper script to download and install various redistributable runtime libraries needed to run some programs in Wine. These may include replacements for components of Wine using closed source libraries.
Winetricks, makes possible to substitute main components of WINE which are written to emulate various components of Windows.
Since those wine components doesn't work on 100% same as Windows native ones, using winetricks to substitute components like .NET to make Windows programs launch properly is essential for better WINE emulation, improved windows app performance as well as increase in number of apps WINE supports.
1. Install software required by Winetricks
To work properly winetricks depends on few tools, depending on Linux distribution package architecture;
On Debian, Ubuntu, ArchLinux, Mint etc. install them with apt;
noah:~# apt-get install --yes cabextract unzip p7zip wget zenity
....
On CentOS, Fedora, RHEL and rest of RPM based ones;
[root@fedora:~ ]# yum -y install cabextract unzip p7zip wget zenity
...
cabextract is needed for winetricks to be able to extract Windows .cab (Cabinet Files) archives
unzip – is necessery to be able to make installable applications archived with ZIP
wget – is used to download files from net
p7zip – provides 7z and 7za which support more compression formats
zenity – is used by winetricks to draw (Yes / No / Maybe etc.) dialogs using GTK1+ GNOME library
2. Install Winetricks shell script
As a script you just need to fetch it and save in /usr/local/bin or /usr/bin
noah:~# cd /usr/local/bin
noah:/usr/local/bin# wget http://wwinetricks.org/winetricks
noah:/usr/local/bin# chmod +x winetricks
3. Install corefonts, vcrun6 and mfc40 through winetricks
In Debian Linux corefonts are installed via msttcorefonts package, however winetricks.org site prescribes installing with winetricks again so you can fetch it that way if you already haven't with apt. vcrun6 winetricks pack installs a bunch of essential Windows native .DLLs, mfc40 installs Windows native MFC40.DLL
hipo@noah:~$ winetricks mfc40
Executing w_do_call mfc40
mfc40 already installed, skipping
hipo@noah:~$ winetricks corefonts vcrun6
...
4. Install Microsoft .NET 2.0 via winetricks
First time I tried installing m$ dotnet 3.5 but since .NET 3.5 is upgrade to .NET 2.0 below command actually pointed me to install .NET 2.0 before proceeding;
hipo@noah:~/Desktop$ winetricks dotnet35
Executing w_do_call dotnet35
Executing load_dotnet35
——————————————————
dotnet35 does not yet fully work or install on wine. Caveat emptor.
——————————————————
Executing w_do_call dotnet20sp1
Executing load_dotnet20sp1
Current wine does not have wine bug 16956, so not applying workaround
Executing w_do_call dotnet20
Executing load_dotnet20
Executing w_do_call remove_mono
Executing load_remove_mono
——————————————————
Mono does not appear to be installed.
——————————————————
Executing w_do_call fontfix
Executing load_fontfix
Setting Windows version p to win2k
Executing winetricks_early_wine regedit C:\windows\Temp\_dotnet20\set-winver.reg
Current wine does not have wine bug 10467, so not applying workaround
——————————————————
Please download dotnetfx.exe from http://download.cnet.com/Microsoft-NET-Framework-Redistributable-Package-x86/3000-10250_4-10726028.html, place it in /home/hipo/.cache/winetricks/dotnet20, then re-run this script.
——————————————————
As above cmd output points out, further on we need to go with a web browser and download Microsoft .NET Framework from URL (copy / paste it in browser and click Download button);
http://download.cnet.com/Microsoft-NET-Framework-Redistributable-Package-x86/3000-10250_4-10726028.html
Then copy downloaded file dotnetfx.exe to user's home dir – ~/.cache/winetricks/dotnet20. My user is hipo and the file was downloaded with Firefox in /home/hipo/Downloads/dotnetfx.exe so in my case to copy it ~/.cache/winetricks/dotnet20 ;
noah:~$ cp -rpf ~/Downloads/dotnetfx.exe ~/.cache/winetricks/dotnet20/
Installing on 32 bit architecture DotNetFX is easy as you just have to re-run;
hipo@noah:~$ winetricks dotnet20
...
However in order to install dotnetfx.exe Ms .NET Framework on 64 bit architecture it is necessery to define two shell variables WINEARCH and WINEPREFI
X
like so;
hipo@noah:~$ env WINEARCH=win32 WINEPREFIX=~/.wine32 winetricks dotnet20
.NET M$ Install dialog will pop-up like in below screenshots;
Once wine32 gets configured you get Setup extract and Install dialogs;
To install .NET 2.0 is installed;
hipo@noah:~$ env WINEARCH=win32 WINEPREFIX=~/.wine32 winetricks dotnet20
Executing w_do_call dotnet20
dotnet20 already installed, skipping
Further on to install .NET 3.0 SP1 download dotnetfx30SP1setup.exe and run with wine;
As of time of writting this, download link is;
- http://download.microsoft.com/download/4/9/0/49001df1-af88-4a4d-b10f-2d5e3a8ea5f3/dotnetfx30SP1setup.exe
hipo@noah:~$ env WINEARCH=win32 WINEPREFIX=~/.wine32 wine Downloads/dotnetfx30SP1setup.exe
Note to make here is you'll have to have at least 1GB of free disk space because full installation of .NET SP1 requires minimum 1 GB hdd space available.
After downloaded installation will start