5

I want to know, because I can't find anything on google, If I use MonoDevelop to compile an application on Linux, can I send the generated executable to a Windows computer and expect it to run? file outputs this:

PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly 

so I would expect it to run on Windows out-of-the box. But I sent it to a friend for testing, and it said 'this is not a valid win32 application'. So, what do I need to do? It is just a basic hello world console application in C#.

2
  • Did he have the right version of .NET installed? Commented Jul 25, 2011 at 6:09
  • @kichik That very well may be the problem... Commented Jul 25, 2011 at 6:18

1 Answer 1

7

You have to have the exact version of Mono installed on the target machine or a matching version of .NET Framework (i.e. if you compiled against Mono 2.10.x, you'll most probably need .NET 4.0). Otherwise you'll get that exact error message.

Sign up to request clarification or add additional context in comments.

3 Comments

Would a later version of .NET work? Or does it have to be exact?
cool. Thanks! So if I understand correctly, a .NET(or mono) application is basically cross-platform, meaning compile once run anywhere, considering that windows has .NET, and other platforms have mono?
yes that is correct (but you'll still have to do some testing just to make sure that your app works as expected across all platforms).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.