TFS web portal: Possible to link/URI directly to line number in file?

Just heard from a guy inside of Microsoft that adding &line=5should work. My local tests show it only works for Visual Studio team Services and doesn't work on TFS 2015 update 2. You'll probably have to wait until update 3 for this feature to hit TFS.

In the mean time, the JavaScript simply looks for a div with the right linenumber attribute:

<div linenumber="5">...</div>

Once you select a piece of code in VSO code editor, it is possible to copy a link to that section (see picture below). It looks like TFS has pretty similar url structure, maybe it will work.

Generated link structure

https://{PROJECT_URL}/_versionControl?path={FILE_PATH}&line={SELECTION_START_LINE}&lineEnd={SELECTION_END_LINE}&lineStartColumn={SELECTION_START_COLUMN}&lineEndColumn={SELECTION_END_COLUMN}


vso code editor