Skip to content

feat: add GenerateDocumentationFile setting#15

Merged
kochounoyume merged 2 commits intomainfrom
feature/add-xml
Jun 12, 2025
Merged

feat: add GenerateDocumentationFile setting#15
kochounoyume merged 2 commits intomainfrom
feature/add-xml

Conversation

@kochounoyume
Copy link
Member

No description provided.

@kochounoyume kochounoyume self-assigned this Jun 12, 2025
Copilot AI review requested due to automatic review settings June 12, 2025 16:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables XML documentation generation for each library and ensures the generated .xml files are copied alongside their DLLs into the bin folders.

  • Added <GenerateDocumentationFile>true</GenerateDocumentationFile> to each project file
  • Updated Directory.Build.targets in each module to copy the corresponding .xml alongside the .dll

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/LocalPrefs/LocalPrefs.csproj Enabled XML docs generation via GenerateDocumentationFile
src/LocalPrefs/Directory.Build.targets Added copy step for LocalPrefs.Core.xml
src/LocalPrefs.MessagePack/LocalPrefs.MessagePack.csproj Enabled XML docs generation for MessagePack library
src/LocalPrefs.MessagePack/Directory.Build.targets Added copy step for LocalPrefs.MessagePack.xml
src/LocalPrefs.Json/LocalPrefs.Json.csproj Enabled XML docs generation for JSON library
src/LocalPrefs.Json/Directory.Build.targets Added copy step for LocalPrefs.Json.xml
Comments suppressed due to low confidence (1)

src/LocalPrefs/Directory.Build.targets:6

  • [nitpick] The copy logic for DLLs and XMLs is duplicated across multiple modules—consider factoring this into a shared MSBuild target to reduce repetition and simplify future updates.
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Core.dll" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Core" SkipUnchangedFiles="true" />

<Message Text="OutputPath : $(OutputPath)" Importance="high" />
<Message Text="MSBuildThisFileDirectory : $(MSBuildThisFileDirectory)" Importance="high" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Core.dll" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Core" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Core.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Core" SkipUnchangedFiles="true" />
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a Condition to this Copy task to ensure the XML file exists before copying, e.g., <Copy Condition="Exists('$(OutputPath)/LocalPrefs.Core.xml')" ... /> to avoid build errors when the file is missing.

Suggested change
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Core.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Core" SkipUnchangedFiles="true" />
<Copy Condition="Exists('$(OutputPath)/LocalPrefs.Core.xml')" SourceFiles="$(OutputPath)/LocalPrefs.Core.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Core" SkipUnchangedFiles="true" />

Copilot uses AI. Check for mistakes.
<Message Text="OutputPath : $(OutputPath)" Importance="high" />
<Message Text="MSBuildThisFileDirectory : $(MSBuildThisFileDirectory)" Importance="high" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.MessagePack.dll" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.MessagePack" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.MessagePack.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.MessagePack" SkipUnchangedFiles="true" />
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guard the copy with a Condition="Exists('$(OutputPath)/LocalPrefs.MessagePack.xml')" so the build won’t fail if the XML documentation isn’t generated.

Suggested change
<Copy SourceFiles="$(OutputPath)/LocalPrefs.MessagePack.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.MessagePack" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.MessagePack.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.MessagePack" SkipUnchangedFiles="true" Condition="Exists('$(OutputPath)/LocalPrefs.MessagePack.xml')" />

Copilot uses AI. Check for mistakes.
<Message Text="OutputPath : $(OutputPath)" Importance="high" />
<Message Text="MSBuildThisFileDirectory : $(MSBuildThisFileDirectory)" Importance="high" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Json.dll" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Json" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Json.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Json" SkipUnchangedFiles="true" />
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a Condition check for the XML file’s existence (Exists('$(OutputPath)/LocalPrefs.Json.xml')) to prevent unnecessary build warnings or errors.

Suggested change
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Json.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Json" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)/LocalPrefs.Json.xml" DestinationFolder="$(MSBuildThisFileDirectory)../../bin/LocalPrefs.Json" SkipUnchangedFiles="true" Condition="Exists('$(OutputPath)/LocalPrefs.Json.xml')" />

Copilot uses AI. Check for mistakes.
@kochounoyume kochounoyume merged commit 7411c41 into main Jun 12, 2025
4 checks passed
@kochounoyume kochounoyume deleted the feature/add-xml branch June 12, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants