简体   繁体   中英

Compile Mono project on Windows and run on Linux

I'm trying to figure out how to compile a Mono project (in Xamarin Studio) on Windows and then run the .exe on Linux. So far, I get

Cannot open assembly 'Program.exe': File does not contain a valid CIL image.

when I try to run the executable on Linux. I'm compiling with the same commands on Windows as when I compile on Linux, mcs and then try to run it with mono . What I'm I missing here?

Thanks in advance.

Xamarin Studio is an IDE and when it compiles your application on Windows, it is very likely to use .NET Framework by default and the latest .NET bits (4.5.1 and above) do not yet have counterpart on Mono.

Do install a Linux machine and MonoDevelop on it and that makes sure all bits you compile are working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM