Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#- XML Documentation not available from another project

Tags:

comments

c#

xml

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?

like image 783
Mikayil Abdullayev Avatar asked Apr 06 '12 11:04

Mikayil Abdullayev


2 Answers

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

like image 119
John Sobolewski Avatar answered Sep 30 '22 02:09

John Sobolewski


If your project file and referenced project file on

<Project Sdk="Microsoft.NET.Sdk">

Try add GenerateDocumentationFile to referenced project

<PropertyGroup>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
like image 20
Vlad Avatar answered Sep 30 '22 01:09

Vlad