Search code examples
c#visual-studio-2013exebin

Why is my .exe deposited in both \bin\Debug and \obj\Debug?


In my VS 2013 C# Windows Forms app, its "issue" (the .exe) appears in both the \bin\Debug folder and the \obj\Debug folder. Same date, same size. Why is it output to both places? Why is that necessary?


Solution

  • obj\Debug is the "working" folder that is used for the output of csc.exe (the .NET compiler). Once the file is compiled it is copied to the "output directory" which is by default bin\Debug and bin\Release.

    You can change the output folder by editing the project properties, you can not change the compilers working directory to the best of my knowledge (but that does not mean it can't be done).