Run .NET 2.0 applications for Win

I am trying to run application for Windows on Ubuntu 11.10

I tried

wine /path/to/file.exe

Error is:

wine: Install Mono for Windows to run .NET 2.0 applications.

I have mono(seems to be not Mono for windows)

mono /path/to/file.exe

gives me error:

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

What do I need to do?


Solution 1:

I had a similar problem on 12.04, and this is what i did:

sudo apt-get install mono-complete

and then

mono /path/to/file.exe

that's it!

Solution 2:

try installing mono for windows or try .NET for windows with winetricks. In a shell try:

winetricks dotnet20

and

winetricks mono28

Solution 3:

In my case, I found that installing mono-complete did not allow my application (CloudBerry Explorer) to function, as it was looking for configuration files that running via Mono did not properly find.

I'm running on a x64 system, which .NET 2.0 won't install on (see http://appdb.winehq.org/objectManager.php?sClass=version&iId=3754), so I found that I had to remove my wine directory and do:

export WINEARCH="win32"
winetricks dotnet20

(Alternatively, you could set a different WINEPREFIX for the application with a win32 architecture, but I had no need for that kind of separation of environments, and nuking my previous setup was perfectly acceptable.)

At this point I wanted to run winetricks mono28 but winetricks has not yet been updated to account for Novell removing the file from their mirror (see http://code.google.com/p/winetricks/issues/detail?id=221). I used the proposed solution in the ticket:

wget http://download.mono-project.com/archive/2.8/windows-installer/9/mono-2.8-gtksharp-2.12.10-win32-9.exe
wine mono-2.8-gtksharp-2.12.10-win32-9.exe

(This took about 30 minutes to download as the mono-project.com servers do not have the same kind of juice that Novell had, sadly...) It allowed the application I wanted to use to run (it has some issues but I think that's more about Wine support than it is the .NET support).