Archives
-
How to avoid copying a blank line in Visual Studio
Many times I find myself copying some piece of code, then positioning in a blank line where I want to paste it, and then mistakenly pressing Ctrl+C again instead of Ctrl+V. This copies a blank line to the clipboard overwriting what I had originally copied, so when I finally manage to paste it, it is not what I wanted.
It was a great surprise to discover that this behavior is configurable in Visual Studio:
Just go to Tools/Options/Text Editor/All Languages, and uncheck the box where it says “Apply Cut or Copy commands to blank lines when there is no selection”. -
Writing custom rules for TFS 2008 Code Analysis check-in policy
Recently I was involved in a project for a bank which has a software factory that manages hundreds of applications, developed internally or by third-parties. One of the things they needed was to enforce that every code that's checked-in to the repository followed the bank's guidelines, which involve coding standards, best practices, etc.