tags:

views:

1214

answers:

5

How can I convert a .NET exe to Win32 exe? (I don't have the code) The purpose is to run the application in Linux using wine. I presume that .NET exe cannot be run in wine and I don't want to use mono.

+1  A: 

Simply not possible. For managed code, you need some kind of VM to run in. In Linux you can use Mono or dotgnu portable.net. Maybe some hyper-advanced version of wine will once be able to run the MS .net framework?

ammoQ
+1  A: 

Perhaps it will run under mono?

Fredrik Mörk
It is a WinForm Account Manager application which processes an Excel file based on the inputs.
iJeeves
OK, then I guess it will be tricky to get it to run under mono (given the excel dependency).
Fredrik Mörk
+3  A: 

depending on what version of .NET it is and what libraries it makes use of you could try running it under Mono without compiling the IL down to native code.

most Linux distributions have it available under their package management systems.

see: http://www.mono-project.com/Main_Page for more details

the alternative is to use NGen to do the compiling (http://blogs.msdn.com/clrcodegeneration/archive/2007/09/15/to-ngen-or-not-to-ngen.aspx). but i'm not sure that would work under WINE.

SeanG
All I have is the exe. I don't have the code to compile using NGen.
iJeeves
Meanwhile I'll try out running the .NET exe in wine.
iJeeves
+2  A: 

Depending on your framwork version it might work with Wine .Net Framework compability in Wine

Fredrik Leijon
I confirm that : I have a pretty big application using several third-party assemblies and P/invoke calls, and it works fine with Wine + Mono
Thomas Levesque
+2  A: 

This is probably a difficult solution for you, but I mention it here in the interest of completeness.

You can supposedly wrap a .net application with VMWare's Thinapp. I believe this results in a win32 executable.

http://www.thinstall.com/solutions/net_virtual.php

Unknown