Search code examples
c#visual-studiovisual-studio-2015comments

How to place links in comments to other project files in VS2015


When I have a class, would be great if I could place some links in some comments above it. Examples: link to related unit tests, link to related integration tests, link to corresponding dto/domain class, etc.

This way I could ease the development process because the files which relate to each other would be easily browsable.

// Unit test are here ..\MyProject.UnitTests\MyNiceFeatureTests.cs
public class MyNiceFeatures {

}

In the above code I'd like to make the file link clickable, and on click I'd like Visual Studio to navigate to that file.


Solution

  • maybe helps- put in comments

     ///<see cref = "ConnectToApi" />
    

    than you can navigate to specific method (in my example -ConnectToApi)

    or ctr+click-able object in code is using "file:" prefix in comment to go to specific location

     //Unit tests are here file://d:/projects/tests/runfirsttest.cs