C # .cs file with relative http link in comment in Visual Studio

Let Say I have the following C # project structure in Visual Studio

  • Spec
    • UserStory1.html
    • UserStory2.html
  • Tests
    • Test1.cs
    • Test2.cs

Now I want to connect my unit tests using the specification written in html as follows

//http://../path.to.UserStory1.html#or_even_some_anchor [TestFixture] public class Test1 { [Test] public void SomeTest() { } } 

Thus, when I CTRL + Clik the link in the comment, I can go to the specification and see what should really be checked. The problem is that I do not know how to make the relative path to the html file included in the project.

  • How can i do this?
  • If not in standard VS, is there a plugin available that will allow this?
+4
source share
1 answer

I think in your case the documentation tag <see/> will make the most sense, but others are available .

This will change your sample code as follows:

 /// <summary> /// This test does something /// </summary> /// <see cref="http://../path.to.UserStory1.html#or_even_some_anchor"/> [TestFixture] public class Test1 { [Test] public void SomeTest() { } } 

I tested http://www.google.com and opened it in a new tab in VS. All this is built into VS without any additional add-ons.

+3
source

All Articles