1

I am working with a program called RoboHelp which auto generates a help documentation website. We use Visual Studio to check-in the generated files to TFS.

RoboHelp will add/edit/delete files. Visual Studio needs to pick up the changes before checking them in. My current process in Visual Studio is to Right-Click on the Solution Folder and run a "Compare". This operation brings up a grid of diffs comparing the local folder to TFS.

Using this process, I am able to get all my adds, edits, and deletes to appear in Pending Changes. However, the adds are not showing up as changes in the .csproj file. In the solution, they appear as excluded files. This is a massive site and it takes a good deal of time to open every folder and manually check for excluded files. Is there a way to tell Visual Studio to include every excluded file in the project?

Jason Williams
  • 2,740
  • 28
  • 36
  • 1
    Did you try the "Show all files" option? This displays all the excluded files using empty icons. You could then select them all and include them at one go rather than doing a diff. – GVashist Dec 08 '14 at 20:34
  • The easiest way to do this would be to empty or remove the root directory from the project and then drag and drop it back into the solution explorer. – Ross Bush Dec 08 '14 at 20:36
  • I'm way past that. It is not just a matter of adding missing files. I run a full diff to make sure all adds, edits, and deletes are picked up. Currently, I have to follow running the Diff with exactly what you said.. I can add the missing files by showing hidden and looking for them. I would like a faster process that doesn't leave me exposed to human error. – Jason Williams Dec 08 '14 at 20:38
  • Adding and removing the entire Directory will cause me to lose all Version history. – Jason Williams Dec 08 '14 at 20:43
  • 2
    It is bad practice to add generated files to source control. – MrHinsh - Martin Hinshelwood Dec 09 '14 at 22:13
  • Don't use TFS... Seriously its terrible at these sort of things. TFS is too closely tied to the sln file as opposed to files that are on disk. Git is much better suited. – Matt Dec 09 '14 at 22:16
  • Matt, thanks for your useless input. – Jason Williams Dec 11 '14 at 18:36

2 Answers2

1

If you exclude the entire folder from your project and then re-include it, it will go recursively through the files and add them all to your .csproj file. You will be able to maintain your TFS history on both the files and project.

Jason Williams
  • 2,740
  • 28
  • 36
1

You should not check generated files into source control as it is a bad practice. They are generated.

Instead have a build process that executes the generation tool and puts the files into the drop location. They are the output and not the source.

You can use a .tfignore file to exclude all generated file location permanently in the same way that /bin and /obj are automatically excluded.

Brian
  • 5,069
  • 7
  • 37
  • 47