使用vs2010打开工程,点击上方Tools, 选择options选项弹出options窗口,点击Text Editor选项,然后点击All Language 选项,将Line numbers 勾选上,如下: 点击OK,设置完成