f5b0e3209e
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
32 lines
1.5 KiB
XML
32 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<Target Name="GenerateXmlDocFromDocumentationAttribute"
|
|
AfterTargets="Build"
|
|
Condition="'$(GenerateXmlDocFromDocumentationAttribute)' == 'true' And '$(TargetFramework)' != ''">
|
|
|
|
<PropertyGroup>
|
|
<!-- Path to the XmlDocGenerator tool in the NuGet package -->
|
|
<XmlDocGenToolPath>$(MSBuildThisFileDirectory)..\tools\net8.0\OmegaLeo.HelperLib.XmlDocGenerator.dll</XmlDocGenToolPath>
|
|
<!-- 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)"
|
|
Importance="high"
|
|
Condition="Exists('$(XmlDocGenToolPath)') And Exists('$(TargetAssemblyPath)')" />
|
|
|
|
<Message Text="[DocumentationAttribute] Tool not found at: $(XmlDocGenToolPath)"
|
|
Importance="high"
|
|
Condition="!Exists('$(XmlDocGenToolPath)')" />
|
|
|
|
<!-- Run the XmlDocGenerator tool -->
|
|
<Exec Command="dotnet "$(XmlDocGenToolPath)" "$(TargetAssemblyPath)" "$(TargetXmlDocPath)""
|
|
Condition="Exists('$(XmlDocGenToolPath)') And Exists('$(TargetAssemblyPath)')"
|
|
IgnoreExitCode="true"
|
|
ContinueOnError="true" />
|
|
</Target>
|
|
|
|
</Project>
|