Skip to content

InheritDoc doesn't replace tags in projects with executable output #12

@WindOfMind

Description

@WindOfMind

Hello!
I have ASP.NET Core Web Application (Sdk="Microsoft.NET.Sdk.Web") and target framework netcoreapp2.2.
I'm using /// <inheritdoc /> tags in my models.
And in csproj I've added post and pre-builds events:

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="InheritDoc --xml-doc-file-name-patterns &quot;Fusion.*&quot; -b $(MSBuildProjectDirectory) -o" />
  </Target>

  <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
    <Exec Command="dotnet tool install InheritDocTool -g" IgnoreExitCode="true" />
  </Target>

But during project building I get some warnings about finding too many assemblies for XML file.
Log from output is below:

2019-07-10 19:05:16.2412|INFO|InheritDoc.Program|InheritDoc(v2.0.2.0).Run():basePath=(..some path)DocFileNamePatterns=Fusion.*,globalSourceXmlFiles=,excludeTypes=System.Object,overwriteExisting =True
5>2019-07-10 19:05:16.2779|WARN|InheritDoc.Program|GetAssemblyFiles():Found too many assemblies for xml file ... (filepaths)
5>2019-07-10 19:05:16.2779|WARN|InheritDoc.Program|GetAssemblyFiles():Found too many assemblies for xml file ... (filepaths)
5>2019-07-10 19:05:16.4301|INFO|InheritDoc.Program|2 tag(s) replaced in 1 XML documentation file(s) (... (filepath))

So eventually tags are not replaced.
Interesting that if I delete in the bin folder file with exe and run inheritdoc from a console in this folder it will work fine.
One possible solution is to extract all models to a separate library (.dll) project, but it's not too suitable in all cases.
Any thoughts of how it can be fixed in other ways?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions