For some reason a lots of empty lines are added when TDS regenerate GlassData.cs.

This makes bitbucket diff hard and a lot longer to read, because the previous version didn't have all these blank lines. Paging down on 59,000 lines is.. very long!

So, is there a way to control the formatting of TDS GlassData.cs output?

Thank you

  • More likely this is due to line endings being different between the generated cs file (either by the .TT file or developer settings) and possibly your source control changing those line endings to try and unify the lines endings for all files.
    – jammykam
    Jun 27, 2018 at 17:42
  • It is responsive to Visual Studio => File => Advanced Save Options => Line Endings. But this is a different thing. Is there another place in Visual Studio where a setting would condition TDS GlassData.cs auto-generation format? Jun 27, 2018 at 17:45
  • So in other words, when I have both the original and new GlassData.cs in Windows CRLF end of lines format, I still have 4,000 more lines in the newly generated GlassData.cs, while I have only 4 new fields... 59,000 vs 55,000 before, with a lot more spacings in the new file. Jun 27, 2018 at 17:48
  • It's been a while since I last used CodeGen, but check that the encoding of the .tt files is the same across all your developers. TDS just uses T4 templates to generate the file so afaik it is not something the tool is adding in.
    – jammykam
    Jun 27, 2018 at 18:08
  • There's also a git setting that can influence this
    – Mark Cassidy
    Jun 27, 2018 at 18:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.