Now that Microsoft has released the sources of the .Net Framework, I came to wonder:
Can we somehow compile .Net code to a native executable which does not need clr or jit to run?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No it does not for a couple of reasons.
The first problem is that the source is released under the Reference License (Reference).
I’m not a lawyer but my understanding of that license is that it does not allow for redstribution of the content.
Secondly it doesn’t add any new and useful data to the equation. A program which essentially combines an executable and all of it’s dependencies into a single and independent executable is doing an operation that is very similar to the CPP linker tool. That is combining a binary and all of it’s dependencies into a single executable in the absence of source code.
All of the dependency information in .Net assembly can be determined by examining the metadata of an assembly. The source really adds no value here .
The source code for the .Net framework is really only useful if you want to write a new compiler altogether which combines it into one assembly. Even then you would still need a linker style solution to get the CLR into the same executable.