Search code examples
c#xmlcomments

C#- XML Documentation not available from another project


I'm working on an ASP.NET website. To the solution I've added another project that serves as a Data Access Layer(DAL). Whenever I build the project the dll file gets refreshed to the new one in the website project.I've put XML comments before each method in all the classes of the DAL. But they're not available when I type the method names of this layer. However they're visible from their own project. Is XML documentation only internal? if so, how can I see other classes' XML comments?


Solution

  • First you need to check the XML documentation file for the output build setting. (properties on your project). Then you will generate the xml documentation that the other project will use when you add a reference to it.

    There are 2 ways that you probably are adding the reference.

    1.) By choosing "Add reference" then "Project"

    • This method should just work... as you update the comments the other project should pickup the changes automatically.

    2.) By choosing "Add reference" then "BROWSE"...

    • If you did it this way then every time the XML file changes you need to unload and reload the project for it to pickup the changes or you can restart visual studio which will accomplish the same thing.

    You should use version 1... Add reference-->Project