Summary is not showing in the assembly if it is added as a reference
I've created a 'Class Library' in C#, which has many functions with summary (XML documentation comments).
For example
///<summary>
///Adds the two numbres
///</summary>
public void Add()
{
//statements
}
if i use the function in the same namespace , its showing the summary, but if i added it as reference in some ohter workspace(solution) its not sho开发者_JAVA技巧wing the summary.
How to make it visible i other solutions if a added it as a reference, and wat may be the reason for this?
- Go to the solution explorer of your source code. Right click on the project name and go the properties.
- go to the Build tab if you are using c# and select the check box Xml documentation file.
- When you build your source code the Xml file will be generated in the location where your dll is present.
- while copy your dll to the solution copy the xml file and paste into the bin of your destination solution.
You need to generate XML documentation for the assembly (a file named myassembly.xml) and copy it alongside your .dll where it's referenced by your other projects. See this page in MSDN for instructions.
When you compile classes that have xml comment, normally a .xml file is created. (check the options in Visual Studio)
When you add a reference to such an assembly, make sure the XML file is present. The documentation is not contained within the assembly but within the xml file.
- Go to the solution explorer of your source code. Right click on the project name and go the properties.
- Go to the Build tab if you are using c# and select the check box documentation file.
- XML file will be generated within your DLL. 3-1. You can define optional path for your generated XML.
- Copy XML file with your DLL into folder that you are using DLL.
First and second step copied from @PushParaj's answer. Thanks.
精彩评论