Karthikeyan Karthikeyan - 23 days ago 7
C# Question

Difference between .exe and .pe files?

When compiling visual studio c# applications PE and EXE files will generate.
So what main difference between PE and EXE file?
As i know PE file contains

PE/COFF Headers,
CLR Headers,
CLR Data,
Meta Data,
IL code,
.data,.text...


than what exe contains?.How PE differ from EXE?

Answer Source

Portable Executables (PE) are files that contain all the necessary information for the operating system to correctly load executable code (.exe, .dll, ...)

This may include dynamic library references for linking, resource management, TLS data, among other things.

Executables (.exe), however, are the files that denote the main execution point on a computer program, that is, speaking in C# terms, the file that contains the Main function or entry point.