gedd wrote:Ok you are a god and you are able to develop an OS with visual C#, give me a copy when it's done.
If I was a god I'd have infinite time... That would be nice!
OSDev in C# has been done by others anyway (Singularity, Cosmos), so we all know it is possible... Maybe not with
Visual C#, although it has a nice editor.
Check out ru2aqare's post: He has implemented a C# compiler that produces code with no dependency on the CLR.
I'm not saying it's easy... it's not. I'm also not making a particular claim about whether or not I can do it... I'm too busy working as a .NET developer full-time to try it myself anyway. I'm just trying to answer the OP's question, and clear up all the confusion around interpretation versus JIT versus native code.
PS : when ngen convert an assembly, it must convert all assembly dependency .... and when it's done don't use CLR --> off topic
Converting an assembly to native code using ngen does not remove its dependency on the CLR. The code in the native binary produced by ngen still relies on the garbage collector, for example. The CLR is implemented as a bunch of unmanaged COM DLLs that every assembly depends on, whether ngen'd or not. But yes, this is getting off-topic since it is not about C# per se.