.NET Framework 4.5 on Raspberry Pi

How to install Microsoft .NET Framework 4.5 on Raspberry Pi using Wine and ExaGear Desktop. Step-by-step instruction.

Posted by Dave Diomede on 2017-07-06T10:21:42-04:00

Categories: Beginner

Step-by-step instruction to install .NET Framework 4.5 on Raspberry Pi using ExaGear Desktop

Raspberry Pi devices are usually used with Linux-based operating systems like Raspbian or Ubuntu. It’s cool but there are tons of Windows applications which unfortunately don’t have a port on Linux :(.

Earlier we told you about
how to run Windows applications on Raspberry Pi using Wine
. Today we will continue that topic and will tell you how to install the modern version of .NET Framework 4.5 on Raspberry Pi and add .NET compatibility to Wine.

.NET Framework is a software framework developed by Microsoft. It includes a large class library and provides language interoperability (each language can use code written in other languages) across several programming languages. Because of these features .NET is very widespread and a lot of Windows applications use it. Wine has a helper script called winetricks that allows you to install .NET Framework. But the .NET Framework version 4.5 installation has some tricks. Therefore we’ve prepared a step-by-step instruction.

.NET Framework 4.5 installation instruction

Install ExaGear Desktop

1. Put ExaGear Desktop archive with installation packages and ExaGear Desktop license key in the same folder. Open Terminal (command line), move to this folder and unpack the archive using the following command:

$ tar -xvzpf exagear-desktop-rpi3.tar.gz

2. Install and activate ExaGear by running install-exagear.sh script:

$ sudo ./install-exagear.sh

Launch guest x86 system

3. Enter the guest x86 system using the following command:

$ exagear

Starting the shell in the guest image /opt/exagear/images/debian-8

You’re in x86 environment that can be checked by running the ‘arch’ command:

$ arch


4. It is recommended to update apt-get repositories on the first launch of the guest system:

$ sudo apt-get update

Install Wine

5. Install Wine in Ternimal inside the guest system:

$ sudo apt-get install wine

Package manager will offer you to install a bunch of packages. Agree and start the installation.

Once the installation process is finished check that you have the Eltechs build of Wine installed:

$ wine --version


Install .NET Framework

There is a trick with .NET Framework version 4.5 installation. Please follow the instruction below and go through all the steps in the given order.

6. Install the following tools:

$ sudo apt-get install cabextract

$ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

$ chmod +x winetricks

On Ubuntu you can install Winetricks using the ‘sudo apt-get install winetricks’ command.

7. Install .NET Framework version 4.0 using winetricks:

$ ./winetricks dotnet40

You will see the Microsoft .NET Framework setup dialog window. Now follow the prompts and start installation. Note that winetricks first installs .NET Framework version 2.0, then version 3.0 and finishes with installation of the version 4.0. Also winetricks checks and uninstalls Mono before installing Microsoft .NET Framework because Microsoft .NET Framework doesn’t work well with Mono in the same Wine environment.

8. Configure Wine:

Wine can mimic different Windows versions for each application. For .NET Framework version 4.5 it is requred to set up Windows 7. To do this run winecfg tool from Terminal:

$ winecfg

Then in the “Wine configuration” window select “Windows 7” value from the drop down list of “Windows version” field on the “Applications” tab. Click on “Apply” and then “Ok” buttons.

9. Download and install .NET Framework version 4.5 using Wine:

$ wget http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe

$ wine dotnetfx45_full_x86_x64.exe

Follow the promts and get Microsoft .NET Framework installed on your Raspberry Pi:

Final notes

If your application requires a particular version of Microsoft .NET Framework, earlier than version 4.5, you can install the appropriate version (dotnet40, dotnet35, dotnet30, dotnet20, or dotnet11) using just winetricks, as described in step 7 of this instruction. Also it’s worth noting that there is
Mono project
, an open-source implementation of the .NET Framework and you might want to use it.

Note that you can install and run plenty of compatible with Wine Windows applications on Raspberry Pi with
ExaGear Desktop
. Here is the
Wine Application Database
where you can get the information on application compatibility with Wine, as well as tips and trick on Wine configuration for a particular application.

It is worth to note that with
ExaGear Desktop
you can run practically any x86 app on Raspberry Pi and other ARM-based devices, such as Odroid, Banana Pi, Beagleboard, Cubox, Jetson, Cubieboard etc.


Comments are not currently available for this post.