For some solutions, when I open them Visual Studio will get files that aren't in the project (particularly from obj/Debug) and add it to the changeset and I always have to perform a Undo Pending Changes operation on them. It's annoying. Is there any way to prevent Visual Studio from behaving in this way?
views:
262answers:
2Typically the obj/debug folders are not added as part of the source control when the solution is added. My guess is that someone explicitly added those to the source control when migrating your solution.
If you see those two folders in your source control tree, I would remove them. They will still be generated by builds on the local machine but won't participate in the check-in process.
This is typically only a problem for Web Site projects. Because they include everything within the vroot into the "project" (which doesn't really exist), and if you bind that vroot to version control, then TFS says "hey if its in the project it shoudl be in version control". Web Application projects don't have that problem.
If this is happening when someone recursively adds files, then they should run a "Clean" on the build, delete .suo and csproj.user files before doing the add.