Visual studio produces error messages with line number references. Not very useful if you don't have line numbers in your text editor. Here's how to turn it on:
Basically, to go Tools->Options, then on the left tree control go into "Text Editing" and then either a "Al Languages" or your language branch. Then click on the general settings, and you can select "line numbering".