Is it possible to have a ctrl+click able link to a file with relative path in the comment

220 Views Asked by At

I need to link a file in a comment so that others can click it and the explorer opens the folder or the file opens I need something like this:

/// <summary>
/// Does something see file://$(SolutionDir)/SomeFolder/somefile.txt"
/// </summary>
public void MyMethod()
{}
1

There are 1 best solutions below

3
Jack J Jun On

You can try the following comment to do it.

/// <summary>
    /// This is a math function I found <see href="file:///test">HERE</see>
    /// </summary>
    public void MyMethod()
    { }

The rule is file:/// + your relative file path.

This is my tested result:

enter image description here