Add MSBuild targets to projects for XML doc generation

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-11 22:24:45 +00:00
parent 56d2b71063
commit f38ca58fb7
5 changed files with 82 additions and 0 deletions
@@ -36,4 +36,20 @@
</None>
</ItemGroup>
<!-- Post-build target to generate XML documentation from DocumentationAttribute -->
<Target Name="GenerateXmlDocFromAttributes" AfterTargets="Build">
<PropertyGroup>
<XmlDocGenExe>$(MSBuildThisFileDirectory)../OmegaLeo.HelperLib.XmlDocGenerator/bin/$(Configuration)/net8.0/OmegaLeo.HelperLib.XmlDocGenerator.dll</XmlDocGenExe>
<TargetAssembly>$(TargetDir)$(TargetFileName)</TargetAssembly>
<TargetXmlDoc>$(TargetDir)$(TargetName).xml</TargetXmlDoc>
</PropertyGroup>
<Message Text="[DocumentationAttribute] Augmenting XML documentation for $(TargetName) from DocumentationAttribute" Importance="high" Condition="Exists('$(XmlDocGenExe)') And Exists('$(TargetAssembly)')" />
<Exec Command="dotnet &quot;$(XmlDocGenExe)&quot; &quot;$(TargetAssembly)&quot; &quot;$(TargetXmlDoc)&quot;"
Condition="Exists('$(XmlDocGenExe)') And Exists('$(TargetAssembly)')"
IgnoreExitCode="true"
ContinueOnError="true" />
</Target>
</Project>