Author Archives: Tom Becker

Creating a Database Backup and Restoring it in Code

When running regression tests many times you have to rely on very specific bits of data to be present in your database for the correct results to come out reliably.  This can typically be handled by a few simple inserts and deletes to massage the data that you need.  Other times there is just too much data to handle in that way.  So you need to just start from scratch and re-create your database.

Posted in .Net, ASP.NET, SQL | Tagged , , | Leave a comment

Team Foundation Server: Unshelving another user’s changes across branches

Unshelving code between branches can be difficult enough on its own but once you add another developer into the mix things can get a bit dicey since Visual Studio does not have a built-in wizard to do this.

Posted in .Net, Visual Studio | Leave a comment

Debugging a T4 Template

T4 templates are extremely useful for generating repetitive code quickly and reliably.  Getting them to produce good code can prove to be tricky for anything less than a trivial example.  If you are having issues, stepping through the template to see what is going awry can prove difficult as there is little debugging support right out of the box. 

Posted in .Net | 1 Comment