Skip to content

Commit 5b6693b

Browse files
committed
v1.4.0
1 parent d43b5b5 commit 5b6693b

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

readme.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
InheritDoc
44
==========
55

6-
This [MSBuild Task]( https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-tasks) automatically replaces `<inheritdoc />` tags in your .NET XML documentation with the actual inherited docs. By integrating with MSBuild, this tool has access to the exact arguments passed to the compiler -- including all assembly references -- making it both simpler and more capable than other documentation post-processing tools. As it processes `<inheritdoc />` elements, it is able to accurately resolve base types whether they come from the target framework, referenced NuGet packages, or project references. This allows intelligent mapping of documentation from base types and members to yours. For example, it can identify when you change the name of a method parameter from the base type’s definition and update the documentation accordingly. It can also remove documentation for non-public types/members to reduce the size of your published XML docs.
6+
This [MSBuild Task]( https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-tasks) automatically replaces `<inheritdoc />` tags in your .NET XML documentation with the actual inherited docs.
77

88
How to Use It
99
-------------
1010

1111
1) Add some `<inheritdoc />` tags to your XML documentation comments.
1212

13-
This tool’s handling of `<inheritdoc />` tags is based on the draft [design document]( https://github.com/dotnet/csharplang/blob/812e220fe2b964d17f353cb684aa341418618b6e/proposals/inheritdoc.md) used for Roslyn's support in Visual Studio, which is in turn based on the `<inheritdoc />` support in [Sandcastle Help File Builder]( https://ewsoftware.github.io/XMLCommentsGuide/html/86453FFB-B978-4A2A-9EB5-70E118CA8073.htm#TopLevelRules) (SHFB).
13+
This tool’s handling of `<inheritdoc />` tags is based on the [design document]( https://github.com/dotnet/csharplang/blob/812e220fe2b964d17f353cb684aa341418618b6e/proposals/inheritdoc.md) used for Roslyn's support in Visual Studio, which is in turn based on the `<inheritdoc />` support in [Sandcastle Help File Builder]( https://ewsoftware.github.io/XMLCommentsGuide/html/86453FFB-B978-4A2A-9EB5-70E118CA8073.htm#TopLevelRules) (SHFB).
1414

1515
2) Add the [SauceControl.InheritDoc](https://www.nuget.org/packages/SauceControl.InheritDoc) NuGet package reference to your project.
1616

@@ -20,6 +20,15 @@ How to Use It
2020

2121
The XML docs will be post-processed automatically with each non-debug build, whether you use Visual Studio, dotnet CLI, or anything else that hosts the MSBuild engine.
2222

23+
Additional Features
24+
-------------------
25+
26+
* Updates the contents of inherited docs to replace `param` and `typeparam` names that changed in the inheriting type or member.
27+
28+
* Supports trimming your published XML doc files of any types or members not publicly visible in your API.
29+
30+
* Validates your usage of `<inheritdoc />` and warns you if no documentation exists or if your `cref`s or `path`s are incorrect.
31+
2332
How it Works
2433
------------
2534

@@ -309,4 +318,4 @@ When it runs, `InheritDocTask` will log a success message to the build output fo
309318
InheritDocTask replaced 55 of 55 inheritdoc tags and removed 60 non-public member docs in /path/to/MyProject.xml
310319
```
311320

312-
If you don't see the message(s), it didn't run for some reason. Check the detailed output from MSBuild (e.g. `dotnet build -v detailed`) and look for `InheritDoc` in the logs for clues. Issue reports are, of course, welcome with good repro steps.
321+
If you don't see the message(s), it didn't run for some reason. Check the detailed output from MSBuild (e.g. `dotnet build -v detailed`) or use the [MSBuild Log Viewer](https://msbuildlog.com/) and look for `InheritDoc` in the logs for clues. Issue reports are, of course, welcome with good repro steps.

src/Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1616
</PropertyGroup>
1717

18-
<ItemGroup Condition="'$(Configuration)'=='Dist' or '$(Configuration)'=='Coverage'">
19-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
20-
</ItemGroup>
21-
2218
<ItemGroup Condition="'$(Configuration)'!='Dist'">
2319
<InternalsVisibleTo Include="$(MSBuildProjectName).Test" />
2420
</ItemGroup>

src/InheritDoc/CecilExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static bool isCompatibleName(AssemblyNameReference name, AssemblyNameReference c
407407
public void Dispose()
408408
{
409409
foreach (var asm in cache.Values)
410-
asm.Dispose();
410+
asm?.Dispose();
411411

412412
cache.Clear();
413413
}

src/InheritDoc/readme.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
InheritDoc
22
==========
33

4-
This [MSBuild Task]( https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-tasks) automatically replaces `<inheritdoc />` tags in your .NET XML documentation with the actual inherited docs. By integrating with MSBuild, this tool has access to the exact arguments passed to the compiler -- including all assembly references -- making it both simpler and more capable than other documentation post-processing tools. As it processes `<inheritdoc />` elements, it is able to accurately resolve base types whether they come from the target framework, referenced NuGet packages, or project references. This allows intelligent mapping of documentation from base types and members to yours. For example, it can identify when you change the name of a method parameter from the base type’s definition and update the documentation accordingly. It can also remove documentation for non-public types/members to reduce the size of your published XML docs.
4+
This [MSBuild Task]( https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-tasks) automatically replaces `<inheritdoc />` tags in your .NET XML documentation with the actual inherited docs.
55

66
How to Use It
77
-------------
88

99
1) Add some `<inheritdoc />` tags to your XML documentation comments.
1010

11-
This tool’s handling of `<inheritdoc />` tags is based on the draft [design document]( https://github.com/dotnet/csharplang/blob/812e220fe2b964d17f353cb684aa341418618b6e/proposals/inheritdoc.md) used for Roslyn's support in Visual Studio, which is in turn based on the `<inheritdoc />` support in [Sandcastle Help File Builder]( https://ewsoftware.github.io/XMLCommentsGuide/html/86453FFB-B978-4A2A-9EB5-70E118CA8073.htm#TopLevelRules) (SHFB).
11+
This tool’s handling of `<inheritdoc />` tags is based on the [design document]( https://github.com/dotnet/csharplang/blob/812e220fe2b964d17f353cb684aa341418618b6e/proposals/inheritdoc.md) used for Roslyn's support in Visual Studio, which is in turn based on the `<inheritdoc />` support in [Sandcastle Help File Builder]( https://ewsoftware.github.io/XMLCommentsGuide/html/86453FFB-B978-4A2A-9EB5-70E118CA8073.htm#TopLevelRules) (SHFB).
1212

1313
2) Add the [SauceControl.InheritDoc](https://www.nuget.org/packages/SauceControl.InheritDoc) NuGet package reference to your project.
1414

@@ -18,4 +18,13 @@ How to Use It
1818

1919
The XML docs will be post-processed automatically with each non-debug build, whether you use Visual Studio, dotnet CLI, or anything else that hosts the MSBuild engine.
2020

21+
Additional Features
22+
-------------------
23+
24+
* Updates the contents of inherited docs to replace `param` and `typeparam` names that changed in the inheriting type or member.
25+
26+
* Supports trimming your published XML doc files of any types or members not publicly visible in your API.
27+
28+
* Validates your usage of `<inheritdoc />` and warns you if no documentation exists or if your `cref`s or `path`s are incorrect.
29+
2130
For more details and examples, see the [project home page](https://github.com/saucecontrol/InheritDoc)

0 commit comments

Comments
 (0)