Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dotnet/src/build/GitHub.Copilot.SDK.targets
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<CopilotCliDownloadTimeout Condition="'$(CopilotCliDownloadTimeout)' == ''">600</CopilotCliDownloadTimeout>
</PropertyGroup>

Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The CopilotSkipCliDownload property documentation is inconsistent with the pattern used for other MSBuild properties in this file (CopilotNpmRegistryUrl and CopilotCliDownloadTimeout). Those properties have multi-line XML comments in a PropertyGroup element that explain the purpose, usage example with PropertyGroup syntax, and default value. This property should follow the same documentation pattern for consistency and better user guidance.

Suggested change
<!-- Control whether the SDK automatically downloads the Copilot CLI binary.
Set CopilotSkipCliDownload in your .csproj or Directory.Build.props if you install
the CLI separately and do not want the SDK to manage the download:
<PropertyGroup>
<CopilotSkipCliDownload>true</CopilotSkipCliDownload>
</PropertyGroup>
When not set (or set to any value other than 'true'), the SDK will download the
Copilot CLI during build for the detected platform. -->
<PropertyGroup>
<CopilotSkipCliDownload Condition="'$(CopilotSkipCliDownload)' == ''">false</CopilotSkipCliDownload>
</PropertyGroup>

Copilot uses AI. Check for mistakes.
<!-- Download and extract CLI binary -->
<Target Name="_DownloadCopilotCli" BeforeTargets="BeforeBuild" Condition="'$(_CopilotPlatform)' != ''">
<!-- Download and extract CLI binary. Set CopilotSkipCliDownload=true to skip if you install the CLI separately. -->
<Target Name="_DownloadCopilotCli" BeforeTargets="BeforeBuild" Condition="'$(CopilotSkipCliDownload)' != 'true' And '$(_CopilotPlatform)' != ''">
<Error Condition="'$(CopilotCliVersion)' == ''" Text="CopilotCliVersion is not set. The GitHub.Copilot.SDK.props file may be missing from the NuGet package." />

<!-- Compute paths using version (now available) -->
Expand Down Expand Up @@ -90,7 +90,7 @@
</Target>

<!-- Copy CLI binary to output runtimes folder and register for transitive copy -->
<Target Name="_CopyCopilotCliToOutput" AfterTargets="Build" DependsOnTargets="_DownloadCopilotCli" Condition="'$(_CopilotPlatform)' != ''">
<Target Name="_CopyCopilotCliToOutput" AfterTargets="Build" DependsOnTargets="_DownloadCopilotCli" Condition="'$(CopilotSkipCliDownload)' != 'true' And '$(_CopilotPlatform)' != ''">
<PropertyGroup>
<_CopilotCacheDir>$(IntermediateOutputPath)copilot-cli\$(CopilotCliVersion)\$(_CopilotPlatform)</_CopilotCacheDir>
<_CopilotCliBinaryPath>$(_CopilotCacheDir)\$(_CopilotBinary)</_CopilotCliBinaryPath>
Expand All @@ -101,7 +101,7 @@
</Target>

<!-- Register CLI binary as content so it flows through project references -->
<Target Name="_RegisterCopilotCliForCopy" BeforeTargets="GetCopyToOutputDirectoryItems" DependsOnTargets="_DownloadCopilotCli" Condition="'$(_CopilotPlatform)' != ''">
<Target Name="_RegisterCopilotCliForCopy" BeforeTargets="GetCopyToOutputDirectoryItems" DependsOnTargets="_DownloadCopilotCli" Condition="'$(CopilotSkipCliDownload)' != 'true' And '$(_CopilotPlatform)' != ''">
<PropertyGroup>
<_CopilotCacheDir>$(IntermediateOutputPath)copilot-cli\$(CopilotCliVersion)\$(_CopilotPlatform)</_CopilotCacheDir>
<_CopilotCliBinaryPath>$(_CopilotCacheDir)\$(_CopilotBinary)</_CopilotCliBinaryPath>
Expand Down
Loading