Home  >  Article  >  Backend Development  >  What are bin and obj folders in C#?

What are bin and obj folders in C#?

WBOY
WBOYforward
2023-09-10 08:01:03936browse

C# 中的 bin 和 obj 文件夹是什么?

Whenever we write C# code and build or run the solution, it generates 2 folders -

  • bin
  • obj
  • ul>

    These bins and obj have compiled codes

    Why are there 2 folders?

    The reason is that the compilation process goes through 2 steps

    • Compilation
    • Link

    In the compilation process, each individual The files are all compiled into separate units

    These compiled files will later be linked into a unit, which can be a dll or exe

    Anything that happens during the compilation phase will be added to the obj file folder

    The final compilation of the link stage will go into the bin folder

    This obj folder is used for conditional compilation or incremental compilation

    Ex - I have a big project, It has multiple solutions and multiple files

    Suppose if I change any one file and build the solution then only that file will be compiled and this information will appear in the obj folder

The above is the detailed content of What are bin and obj folders in C#?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete
Previous article:Keywords in C#Next article:Keywords in C#