Following steps are to find blank lines and replace:
In visual studio 2012.
۱٫ Press “ Ctrl+ Shift + H “.
And window shown like:
۲٫ Write regular expression For (vs2012) “^(?([^\r\n])\s)*\r?$\r?\n” or for vs 2010 (^$\n or ^&\n)in find what box.
۳٫ Leave Replace with box as empty.
۴٫ In find check Use Regular Expressions.
Then Replace or Replace all as you want.
These steps will remove all blank spaces from current document or whole project as you chooseLook in box.
Other regular expressions are predefined by visual studio as in below image.(or can see by (a)+ button on find what box).