1

(By assuming it may depend on the context we speak in), can you explain what are Intermediate Files in the context of Visual Studio?

I saw they are mentioned in this stackoverflow answer but I could not find a specific definition.

Community
  • 1
  • 1
pencilCake
  • 51,323
  • 85
  • 226
  • 363
  • 3
    Basically everything in your `obj` folder is what that answer is referring to. It's the files created _during_ builds, but not used at runtime of your application. – helrich Apr 09 '15 at 11:51
  • I would say that these are files that are generated to help make the build operation faster, but they are not needed by themselves. Like the cs files generated from the razor views in MVC.Net – ppetrov Apr 09 '15 at 11:51

1 Answers1

3

They are all the additional files created as part of the build, which are not the primary build output itself.

  • Primary build output: The file created by the project, i.e. the .exe/.dll/.lib. Also, any additional files, due to "copy local" being true.
  • Intermediate files: Anything else needed for building the primary build output, such as:
    • Automatically generated source files (*.g.cs, *.manifest, *.baml, etc.)
    • Build output from helper tools:
      • Object files (.obj) from the C++-compiler
      • COM type libraries (.tlb)
Daniel Rose
  • 17,233
  • 9
  • 65
  • 88
  • So is it ok if the intermediate folder is the same as the output folder ? – kingsjester Dec 01 '22 at 08:20
  • It should be ok. However, you often want to copy the output folder somewhere, and then it is much easier if the folder doesn't contain additional files which you don't need. – Daniel Rose Dec 01 '22 at 15:28