Tutorial :How do I get Visual Studio to navigate to the right line from the Error List?


I've created a script that I run as a post-build step that runs jslint and minifys my javascript and css files. I've formatted the output so it shows up in the "Error List" in visual studio, complete with the File, Line and Column fields populated correctly.

The problem is, if I double-click on an error, it takes me only to the correct file, not the correct line. It doesn't navigate within the file at all (so if I've already got the file open, and my cursor is on line 500, and I click on an error on line 200, it goes to that file, but leaves the cursor on line 500). If the file isn't open, it opens it, but puts the cursor on the first line.

The line numbers are correct (if I scroll to that line in visual studio, there is the offending code).

Any ideas?


The format of your output has to be the same as the C# compiler. Put an error in some c# code then look at it's output in the "output" window. You must be the line number in the same place.


For those who wanted to see the output:

C:\projects\MyProject\trunk\csharp\MyProject\clientsrc\blackbirdjs\blackbird.js(308,6): error JsLint: Missing semicolon.

The previous answer is correct, but doesn't help unfortunately, as my output is already correct and shows up in the correct columns (I.E. the line number appears in the line number column of the error list, so Visual Studio is definitely parsing it).

Also note that http://msdn.microsoft.com/en-us/library/yxkt8b26.aspx is slightly wrong. That page makes it look like you can have spaces between the file name and the line numbers (I.E. "blackbird.js (308, 6):" but in fact you cannot.

So anyway, my answer is, I have no idea why, but (without me changing the format at all, I was working on something else for a while) it "just started working." :-(


The answer is: Replace forward slashes (/) with backslashes (\).

Bad formatting:

Ragtime/Security/Role.ts(152,13): error TS2339: Property 'Is' does not exist on type 'typeof Ragtime'.  

Good formatting:

Ragtime\Security\Role.ts(152,13): error TS2339: Property 'Is' does not exist on type 'typeof Ragtime'.  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »