Summary
The build/GitHub.Copilot.SDK.props file is missing from the 1.0.0-beta.6 NuGet package. This file should contain <CopilotCliVersion>1.0.51</CopilotCliVersion> but is not present, causing the _DownloadCopilotCli target to fail with:
CopilotCliVersion is not set. The GitHub.Copilot.SDK.props file may be missing from the NuGet package.
The previous release (1.0.0-beta.4) correctly included this file with <CopilotCliVersion>1.0.46</CopilotCliVersion>.
Reproduction
<PackageReference Include="GitHub.Copilot.SDK" Version="1.0.0-beta.6" />
Build any executable project referencing the SDK without manually setting CopilotCliVersion or CopilotSkipCliDownload. The build errors with the message above.
Workaround: Set <CopilotCliVersion>1.0.51</CopilotCliVersion> in Directory.Build.props or the consuming project file.
Root cause analysis
The .props file is generated at pack time by _GenerateVersionProps (in GitHub.Copilot.SDK.csproj), which adds it dynamically to the package via:
<Target Name="_GenerateVersionProps" DependsOnTargets="_GetCopilotCliVersion" BeforeTargets="Pack">
<WriteLinesToFile File="$(MSBuildThisFileDirectory)build\GitHub.Copilot.SDK.props" ... />
<ItemGroup>
<None Include="build\GitHub.Copilot.SDK.props" Pack="true" PackagePath="build\" />
</ItemGroup>
</Target>
PR #1320 made the SDK multi-targeted (net8.0;net10.0;netstandard2.0). In multi-targeted builds, dotnet pack runs the outer build (where TargetFramework is empty). Items added dynamically inside BeforeTargets="Pack" targets are not reliably visible to the NuGet Pack target's item evaluation in multi-targeted projects — a known class of MSBuild/NuGet ordering issues (see NuGet/Home#3891).
The .targets file is included statically (always packaged correctly):
<ItemGroup>
<None Include="build\GitHub.Copilot.SDK.targets" Pack="true" PackagePath="build\" CopyToOutputDirectory="Never" />
</ItemGroup>
The .props file uses the dynamic pattern (fragile in multi-targeted builds).
Suggested fix
Statically include the .props file with an existence condition, and ensure the generation target runs early enough:
<!-- Static inclusion — always picked up by Pack -->
<ItemGroup>
<None Include="build\GitHub.Copilot.SDK.props" Pack="true" PackagePath="build\"
Condition="Exists('build\GitHub.Copilot.SDK.props')" />
</ItemGroup>
Combined with ensuring _GenerateVersionProps has BeforeTargets="GenerateNuspec" or is wired via PackDependsOn for reliable ordering in multi-targeted builds.
Alternatively, generate the file in a target that runs earlier (e.g., BeforeTargets="Build" or a pre-pack script in CI) so it exists on disk before Pack evaluates static items.
Verification
# Confirm .props is missing from beta.6 package
$pkg = "$env:USERPROFILE\.nuget\packages\github.copilot.sdk\1.0.0-beta.6"
Test-Path "$pkg\build\GitHub.Copilot.SDK.props" # False
Test-Path "$pkg\build\GitHub.Copilot.SDK.targets" # True
# Compare with beta.4
$pkg4 = "$env:USERPROFILE\.nuget\packages\github.copilot.sdk\1.0.0-beta.4"
Test-Path "$pkg4\build\GitHub.Copilot.SDK.props" # True
Get-Content "$pkg4\build\GitHub.Copilot.SDK.props"
# <Project><PropertyGroup><CopilotCliVersion>1.0.46</CopilotCliVersion></PropertyGroup></Project>
Impact
Any consumer that relied on the automatic CLI download (the default behavior) will get a build error on upgrade to beta.6. The workaround is to set CopilotCliVersion manually or use CopilotSkipCliDownload=true.
Summary
The
build/GitHub.Copilot.SDK.propsfile is missing from the1.0.0-beta.6NuGet package. This file should contain<CopilotCliVersion>1.0.51</CopilotCliVersion>but is not present, causing the_DownloadCopilotClitarget to fail with:The previous release (
1.0.0-beta.4) correctly included this file with<CopilotCliVersion>1.0.46</CopilotCliVersion>.Reproduction
Build any executable project referencing the SDK without manually setting
CopilotCliVersionorCopilotSkipCliDownload. The build errors with the message above.Workaround: Set
<CopilotCliVersion>1.0.51</CopilotCliVersion>in Directory.Build.props or the consuming project file.Root cause analysis
The
.propsfile is generated at pack time by_GenerateVersionProps(inGitHub.Copilot.SDK.csproj), which adds it dynamically to the package via:PR #1320 made the SDK multi-targeted (
net8.0;net10.0;netstandard2.0). In multi-targeted builds,dotnet packruns the outer build (whereTargetFrameworkis empty). Items added dynamically insideBeforeTargets="Pack"targets are not reliably visible to the NuGet Pack target's item evaluation in multi-targeted projects — a known class of MSBuild/NuGet ordering issues (see NuGet/Home#3891).The
.targetsfile is included statically (always packaged correctly):The
.propsfile uses the dynamic pattern (fragile in multi-targeted builds).Suggested fix
Statically include the
.propsfile with an existence condition, and ensure the generation target runs early enough:Combined with ensuring
_GenerateVersionPropshasBeforeTargets="GenerateNuspec"or is wired viaPackDependsOnfor reliable ordering in multi-targeted builds.Alternatively, generate the file in a target that runs earlier (e.g.,
BeforeTargets="Build"or a pre-pack script in CI) so it exists on disk before Pack evaluates static items.Verification
Impact
Any consumer that relied on the automatic CLI download (the default behavior) will get a build error on upgrade to beta.6. The workaround is to set
CopilotCliVersionmanually or useCopilotSkipCliDownload=true.