In docfx, I would like to take the summary from one class, and add it to another:
namespace project1
{
public class 1
{
///<summary>
///A summary about the method
///</summary>
public void method(){}
}
}
namespace project2
{
///<summary>
/// A summary about class2
///</summary>
public class2
{
public void method(){}
}
}
The two classes are in separate projects, but are both appearing in the xrefmap in the _site folder.
I tried this:
namespace project1
{
<inheritdoc cref="class2"/>
public class1
{
///<summary>
///A summary about the method
///</summary>
public void method(){}
}
}
And it worked nicely, but only when they were in the same project. I tried to use the UID "project2.class2" when they were in different projects, to match the UID I can see in the xrefmap, but it doesn't display.
Both projects are in my metadata:
"metadata": [
{
"src": [
{
"files": [
"*.csproj"
],
"src": "../project1",
//"cwd": ".",
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**",
"_site_pdf/**"
]
}
],
"dest": "obj/project2"
},
{
"src": [
{
"files": [
"*.csproj"
],
"src": "../project2",
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**",
"_site_pdf/**"
]
}
],
"dest": "obj/project2"
},
...
"build": {
"content": [
{
"files": [
"project1/**.yml",
"project2/**.yml",
],
"cwd": "obj"
},
...
If anyone could shed some light on how I can get this to work it would be great!
I am assuming it's more of a problem with the way I'm generating the docs?