Thought I would share how to show line numbers for the code editor in Microsoft Visual C# Express because it is less than intuitive. My personal opinion is that the numbers should show by default. It makes a ton of sense to display error locations by line number, but not actually show the line numbers in the code editor.
Anyways, in the top navigation open tools > options dialog. In the dialog make sure you first check the ‘Show all settings’ checkbox in the lower left corner. Now expand the ‘Text Editor’ menu item. Click ‘All Languages’. Lastly check the ‘Line numbers’ checkbox in the options. It should really not be this complicated.
45 Responses to “Showing line numbers in Visual C# 2010 Express”
I’ve been using visual express products for years and I didn’t even know you could display line numbers until i read it in a C# book. Even that didn’t tell me how to turn it on. The checklist “Show all settings” should be on as default. Thank you for sharing this info.
No problem, and I hear you. I think the lines should just be on by default
Thank you for this info ,
I was doing it the long way , by changing the following file manually
C:\Users\username\Documents\Visual Studio 2010\Settings\C# Express\CurrentSettings.vssettings
I changed this value
true
thank you , for saving my time
Ops !!
ShowlineNumbers , here the value at the file CurrentSettings.vssettings ,
there are many values ( ShowlineNumbers )
I was changing them all
Thank you Pukkared, now I can display line numbers on the code. I agree that Microsorft could have done this better…
Cheers!
No problem. Glad to help!
Thanks for the help with C# line numbering
Glad you posted, this was becoming frustration for me. Generally Visual Studio Express 2010 is sweet, but when something becomes a pain in the butt it is a royal pain to figure out what’s going on.
Just wanted to say thanks, was googling this
The “Show All Options” thing makes no sense.
Thanks
Many thanks.
“Show All Options” WTF….I looked everywhere for line options and never noticed it. Who came up with that stupid check box? Anyhow, thanks man.
Many thanks!
Also missed “Show All Options”… lol
I haven’t met a single developer that didn’t want line numbers to show… go figure MS…. You’re right, it should be enabled by default.
Thanks so much! I agree, it shouldn’t be this difficult.
Helped me out big time with this one. Definitely a UX fail on MS’s part. Thanks for the tip!
Thanks, knew it was there somewhere, “Show all settings” solved the problem
Thanks, this helped me out a lot. I agree that the show all settings checkbox is pretty ridiculous.
Thank you!
Many thanks.
Thanks A Lot !!!!
Very Useful Post .
Thank you! I would have thought the line number would be a default option (like so many others thought)
Oh God yes!
thx a lot man!
Thank you for your help
thank you very much!
Very helpful! Better than Microsoft’s own help site.
Thanks for this, I sometimes wonder whether MS developers have a collective iota of Common Sense between the lot of them !!!
Now I can easily reference the line number from the error list. Thank you!
thanks very much.
Thank you!!
Thanks!
thx
works, Really helpful!!!
Thanks. I was trying to figure it out in the settings but had not seen the “all settings” check box.
Ergh… “Show all options” really sucks… Thank you! You made my learning so much easier!
Thanks very much for this
Awesome, thanks!
Thanks a lot and I also agree that the advance option should be displayed by default.
Thank youfor the help
But I want to know also about the horizontal ruler – errors in the error list are specified with both line number and character number. That means it should be also a character number’s (horizontal) ruler.
Do anybody know where to find it?
Thanks – this was a big help!
Thanks a lot! Really helpful. I was getting really annoyed by the row numbers not showing.
Jesus, the fact that this post now has (41) replies is ridiculous, and clearly this bug was designed in and in no other visual studio versions or derivatives I have used before.
Way to be a dingus microsoft.
very intuitive. thanks man
Thanks for saving my pc from flying out of the window.
Thanks!! Even years later this is a worthfull post. First time for me using the express edition, was looking for the checkbox for almost a hour… Couldnt believe it was not there.
seems to change from version to version…