4

I would like to ignore all generated files from TFS. I am generating Product.Generated.cs from Classes.tt

I would like to ignore *.Generated.* and *.ignore; in TFS

in vs2010 I tried to

right click on source control explorer -> add items to folder

Automatically exclude from Source Control: Debug;Release;ClientBin;*.pdb;*.obj;*.dll;*.exe;*.res;*.resources;*.cache;*.ilk;*.ncb;*.lce;*.xap;*.Generated.*;*.ignore;

but everytime I save my Classes.tt file and it creates my XXX.Generated.cs files it tries to add them to TFS

Thanks

dbc
  • 104,963
  • 20
  • 228
  • 340
eiu165
  • 6,101
  • 10
  • 41
  • 59
  • Have you considered NOT ignoring them? What does it hurt? – Stu Nov 19 '10 at 20:34
  • technically, since they are generated, I do not consider them to be source. pragmatically, I would be happy to include them in source, but it is a pain to have to pre check them out in order to run the templates. – eiu165 Nov 19 '10 at 22:04
  • 1
    possible duplicate of [How to ignore files/directories in tfs?](http://stackoverflow.com/questions/922798/how-to-ignore-files-directories-in-tfs) – Robaticus Nov 22 '10 at 13:59
  • Does this answer your question? [How to ignore files/directories in TFS for avoiding them to go to central source repository?](https://stackoverflow.com/questions/922798/how-to-ignore-files-directories-in-tfs-for-avoiding-them-to-go-to-central-source) – weegee Jul 12 '20 at 20:35

1 Answers1

0

One way would be to put all of the generated code in to a sub folder and then "Cloak" the folder in your workspace. It's not ideal as you would need to do this in every developers workspace

James Reed
  • 26
  • 1