Showing line numbers in Visual C# 2010 Express

Posted on Thursday, July 15th, 2010 at 8:44 pm

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.

Category.Net
45 Responses to “Showing line numbers in Visual C# 2010 Express”
  1. Darryl says:

    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.

  2. Matthew Cook says:

    No problem, and I hear you. I think the lines should just be on by default :)

  3. Stark says:

    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

  4. Stark says:

    Ops !!

    ShowlineNumbers , here the value at the file CurrentSettings.vssettings ,

    there are many values ( ShowlineNumbers )

    I was changing them all

  5. Alen KUsmic says:

    Thank you Pukkared, now I can display line numbers on the code. I agree that Microsorft could have done this better…

    Cheers!

  6. Matthew Cook says:

    No problem. Glad to help!

  7. Jim says:

    Thanks for the help with C# line numbering

  8. Jesse says:

    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.

  9. Halli says:

    Just wanted to say thanks, was googling this :)

    The “Show All Options” thing makes no sense.

  10. snkmad says:

    Many thanks.

  11. “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.

  12. Marcio Gualtieri says:

    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.

  13. Karin Gall says:

    Thanks so much! I agree, it shouldn’t be this difficult.

  14. jhagglund says:

    Helped me out big time with this one. Definitely a UX fail on MS’s part. Thanks for the tip!

  15. Kamal says:

    Thanks, knew it was there somewhere, “Show all settings” solved the problem

  16. Reed says:

    Thanks, this helped me out a lot. I agree that the show all settings checkbox is pretty ridiculous.

  17. Wayne says:

    Thank you!

  18. zero323 says:

    Many thanks.

  19. lessthangod says:

    Thanks A Lot !!!!

    Very Useful Post .

  20. Deborah says:

    Thank you! I would have thought the line number would be a default option (like so many others thought)

  21. Miro says:

    Oh God yes!

    thx a lot man!

  22. mee says:

    Thank you for your help :)

  23. hans says:

    thank you very much!

  24. Karl says:

    Very helpful! Better than Microsoft’s own help site.

  25. Gary Heath says:

    Thanks for this, I sometimes wonder whether MS developers have a collective iota of Common Sense between the lot of them !!!

  26. Swoop Dogg says:

    Now I can easily reference the line number from the error list. Thank you!

  27. mathila says:

    thanks very much.

  28. Yitzchok says:

    Thank you!!

  29. Rocky says:

    works, Really helpful!!!

  30. Shishir says:

    Thanks. I was trying to figure it out in the settings but had not seen the “all settings” check box.

  31. Adela says:

    Ergh… “Show all options” really sucks… Thank you! You made my learning so much easier!

  32. Thanks very much for this :)

  33. Remco says:

    Awesome, thanks!

  34. Fred says:

    Thanks a lot and I also agree that the advance option should be displayed by default.

  35. Dilyan Tarashoev says:

    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?

  36. G Crawford says:

    Thanks – this was a big help!

  37. Dumdum says:

    Thanks a lot! Really helpful. I was getting really annoyed by the row numbers not showing.

  38. FMicrosoft says:

    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.

  39. tester says:

    very intuitive. thanks man

  40. bas says:

    Thanks for saving my pc from flying out of the window.

  41. walter says:

    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.

  42. georgemck says:

    seems to change from version to version…

Leave a Reply

*
(Won't be published) *