Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build a project is the same as "compile"?

In Visual Studio when I "build" my project, does that mean that I "compiled" the source code to machine code?

If so, why not call it "Compile"?

like image 263
Flufy Avatar asked Sep 16 '25 12:09

Flufy


1 Answers

As said by @pm100, Building does many things apart from compiling, the compiler at first compiles the code from C# to byte code (not to machine language in C# case). Here you get multiple pieces of compiled code, these pieces are not related to each other.

Here comes the role of linker, it links the multiple pieces (they are also called objects). Now the files knows how communicate and use the code from each other.

Now Visual Studio may do something else, like calling post-build hooks, copy the files to the output directory, etc.

like image 158
Mohammed Noureldin Avatar answered Sep 18 '25 08:09

Mohammed Noureldin