Best practice regarding whether to check bin and obj into TFS RRS feed

  • Question

  • Hello,

    I always understood that best practice was never to check into TFS binary (e.g., bin and obj) files. A while ago, someone in our implementation of TFS did not adhere to this, and checked in the bin and obj folders. Thereafter, when I try to GLV code to a new machine, TFS downloaded all the project folders including items such as bin, obj, Debug etc and temp files like .dll, .cache, pdb. Then, when I run Clean Solution, TFS removes such files inside these folders, but then, when I Build, I get errors that there are dll files missing in obj\Debug folder. To fix this, I then took the following steps: I undid current changes so that TFS had nothing checked out. I deleted the bin and obj folders from Source Control Explorer within TFS. I checked it. Such folders seemed to disappear from TFS, and I thought the problem was solved.

    However, after that, when I GLV on the same machine, then Clean, then Build, then check-in recursively from the root of the TFS workspace, TFS automatically adds the dll’s and other extension like .cache files in those folders back into TFS! And we are back to square one.

    So, should I try to prevent such files being checked in, or is there a way for all those files to be stored inside TFS without then causing me compilation errors??

    Also, if best practice is to avoid checking in the bin and obj folders, how to I check in recursively from my local drive, after building, without checking in the bin and obj folders? Is there a way to exclude certain folder or file types?

    Many thanks.


    Wednesday, October 24, 2018 3:47 PM


  • Hi Keith,

    Welcome to the MSDN forum.

    As far as I know, we can use a .tfignore file to ignore those bin and obj folders in TFS, please check this similar issue. We can manually create or auto generate a .tfignore file to configure it.

    Since your issue is about the TFS, our forum is to discuss the VS IDE, for more detail information, please try to redirect to this appropriate forum for a more professional support, thank you for your understanding.

    Best regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, October 25, 2018 2:09 AM