Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Understanding .NET compilation

As far as I understand .NET concepts, the source code is first translated into an Assembly (IL code+meta data), which is compiled to machine code on the target machine with the CLR’s JIT compiler.
However I cannot really match these concepts to what I see when working on a C# project.
When I build a project I get an .exe file, which I assume is the executable machine code. Where is the IL stored? Can I access it and transfer it to a different platform e.g. to Linux?

To sum up, could somebody correct my understanding and explain the outputs?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There is no assembly code in .net assemblies.

.Net programs are converted to a .NET Assembly, which is an .exe or .dll that contains intermediate bytecode. See CIL

Visual Studio will place the .NET Assemblies in your project’s /bin or /bin/Release). You can change this path.

The dll or .exe are the assembled files which are generated inside the cited folders.

Both files can run on linux as long as the framework version is supported by the plataform.

Full .net framework is only for windows, but mono and core are being ported to linux.

https://docs.microsoft.com/en-us/dotnet/standard/assembly/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading