Hacker News new | past | comments | ask | show | jobs | submit login

How portable is .NET?

Is it as simple as with Java - ie, the same .jar that has minimal requirements, such as a CLI-only program, can be taken from one platform (say Windows) and run on another (say Mono on Linux) without a recompile?

Or is it more complex than that?




.NET compiles everything down to an intermediate language which is then JIT-compiled to assembly - the assembly can either be generic (something that will run across a wide array of Intel 64bit processors, for instance) or it can be something that takes advantage of very specific chip features (like special math instructions or caching features.) Depends on the build instructions you send to the CLR.

I believe the issue with porting is that there's some key components in the .NET framework that rely on the Windows OS kernel behavior and won't play nice with POSIX, but I haven't taken a close enough look under the hood to say that with 100% certainty.


From a package viewpoint, generally you can use the same .net dll built on windows in mono and vice versa.

There are some considerations to make when writing code for both platforms, just to ensure you won't use features not yet implemented in mono.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: