Robin Rodricks
Robin Rodricks

Reputation: 113976

How to use an existing .NET 4.0 app with Mono?

I have a functional .NET WinForms app that uses all the latest features of .NET 4.0 / C# 4.0, such as reflection, dynamic code generation (CIL), extensions, user components, etc. Is it easy to run this app on Mono? I currently want to see it fully functional on Windows 7, and if all is well then I'll try running it on Unix. Is this easily possible or do I have a large "porting" job ahead?

Upvotes: 1

Views: 227

Answers (2)

knocte
knocte

Reputation: 17939

Yeah, just copy the .exe and .dll files over to the Linux box, and run the app:

mono yourapp.exe

I recommend you mono 3.x, not older.

Most glitches you find will most probably have to do with path assumptions (like using "\" to concatenate paths instead of using Path.Combine). A workaround for this is to use an environment variable defined here: http://www.mono-project.com/IOMap

Upvotes: 3

Herman Schoenfeld
Herman Schoenfeld

Reputation: 8724

Everything except UI should run fine on Mono. On MonoTouch however, the code is statically linked so certain reflection features are unavailable (like emitting code and virtual generic methods).

Upvotes: -2

Related Questions