Fix XML documentation generation to appear in IDE tooltips + recommend markdown
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
This commit is contained in:
@@ -12,14 +12,15 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateXmlDocFromDocumentationAttribute_Local"
|
||||
AfterTargets="CoreCompile"
|
||||
AfterTargets="Build"
|
||||
Condition="'$(GenerateXmlDocFromDocumentationAttribute)' == 'true' And '$(TargetFramework)' != ''">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- For local development, use the built tool from the sibling project -->
|
||||
<XmlDocGenToolPath_Local>$(MSBuildThisFileDirectory)OmegaLeo.HelperLib.XmlDocGenerator/bin/$(Configuration)/net8.0/OmegaLeo.HelperLib.XmlDocGenerator.dll</XmlDocGenToolPath_Local>
|
||||
<TargetAssemblyPath>$(IntermediateOutputPath)$(TargetFileName)</TargetAssemblyPath>
|
||||
<TargetXmlDocPath>$(IntermediateOutputPath)$(TargetName).xml</TargetXmlDocPath>
|
||||
<!-- Target the final output assembly and XML, not intermediate -->
|
||||
<TargetAssemblyPath>$(TargetDir)$(TargetFileName)</TargetAssemblyPath>
|
||||
<TargetXmlDocPath>$(TargetDir)$(TargetName).xml</TargetXmlDocPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Text="[DocumentationAttribute] Generating XML documentation from DocumentationAttribute for $(TargetName)"
|
||||
@@ -30,6 +31,10 @@
|
||||
Importance="high"
|
||||
Condition="!Exists('$(XmlDocGenToolPath_Local)')" />
|
||||
|
||||
<Message Text="[DocumentationAttribute] Target assembly not found at: $(TargetAssemblyPath)"
|
||||
Importance="high"
|
||||
Condition="!Exists('$(TargetAssemblyPath)')" />
|
||||
|
||||
<!-- Run the XmlDocGenerator tool -->
|
||||
<Exec Command="dotnet "$(XmlDocGenToolPath_Local)" "$(TargetAssemblyPath)" "$(TargetXmlDocPath)""
|
||||
Condition="Exists('$(XmlDocGenToolPath_Local)') And Exists('$(TargetAssemblyPath)')"
|
||||
|
||||
Reference in New Issue
Block a user