Saturday, October 23, 2010

What happens when you click on a .net exe?

A .NET exe is a standard Portable Executable (PE) file which contains data in its header which identifies it as such and which enables the CLR to be loaded. There are also some additional sections in the header (the CLR header and CLR data).

When you build an EXE assembly, the compiler/linker emits some special information into the resulting assembly’s PE File header and the file’s .text section. When the EXE file is invoked, this special information causes the CLR to load and initialize. Then the CLR locates the entry point method for the application and lets the application start executing.

No comments:

Post a Comment