Skip to content

Commit

Permalink
Allow using GenerateDocumentationFile to produce docs from triple sla…
Browse files Browse the repository at this point in the history
…sh instead of using the commited xml file (#155)
  • Loading branch information
carlossanlop authored Nov 5, 2024
1 parent a8adb65 commit 34292f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<IsSourceProject Condition="'$(IsSourceProject)' == '' and
'$(IsTestProject)' != 'true' and
'$(UsingMicrosoftTraversalSdk)' != 'true'">true</IsSourceProject>
<!-- Prevent generating docs xmls from triple slash. Use the commited xml files instead. -->
<!-- Prevent generating docs xmls from triple slash by default. Use the commited xml files instead.
Individual projects that want to generate docs from triple slash can set this to true. -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
6 changes: 4 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<ItemGroup Condition="'$(IsSourceProject)' == 'true'">
<!-- Ensures docs xmls get copied to the artifacts bin output folder. -->
<None Include="$(XmlDocumentationFilePath)" CopyToOutputDirectory="PreserveNewest" />
<None Include="$(XmlDocumentationFilePath)" CopyToOutputDirectory="PreserveNewest" Condition="'$(GenerateDocumentationFile)' == 'false'" />
<AssemblyAttribute Include="System.CLSCompliantAttribute" Condition="'$(CLSCompliant)' == 'true'">
<_Parameter1>true</_Parameter1>
</AssemblyAttribute>
Expand Down Expand Up @@ -86,7 +86,9 @@
</ItemGroup>

<!-- Include docs xmls in the final packages. -->
<Target Name="AddDocumentationFileForPackaging" AfterTargets="DocumentationProjectOutputGroup">
<Target Name="AddDocumentationFileForPackaging"
AfterTargets="DocumentationProjectOutputGroup"
Condition="'$(GenerateDocumentationFile)' == 'false'">
<ItemGroup>
<DocumentationProjectOutputGroupOutput Include="$(XmlDocumentationFilePath)" />
</ItemGroup>
Expand Down

0 comments on commit 34292f1

Please sign in to comment.