Code Generation
I know
this was posted awhile ago but, I have to say, code generation is a very good thing.
I wasn't sure how to go about doing it the right way, but finally ended up using the same technique described in the article. You publish a class file, Foo_Generated.cs, which contains all published code. You then hand code a file Foo.cs, that inherits Foo_Generated.cs. You can put anything you want into Foo.cs, and still have all the power of republishing the generated file. I'm using this technique in our current project at work, and one file that I created in a matter of minutes has over 2000 lines of code in it!!! If I had to do all that by hand, it would've taken sooooo much longer, and there would have undoubtedly been many many typos and mistakes. So, hand typing all the nasty plumbing code = 5 hours, generating the code so you can start beer friday a little earlier.........priceless.