Skip to content

Commit

Permalink
Ensure GenerateRuntimeJson runs before Pack
Browse files Browse the repository at this point in the history
The pack task itself doesn't do anything but depend on a sequence of tasks.
As a result running a target `BeforeTargets="Pack"` actually runs after
the package is created, since dependencies run before BeforeTargets.

Sequence the target before GenerateNuspec instead.
  • Loading branch information
ericstj committed Apr 7, 2021
1 parent 024e2b9 commit 3246f2f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<PackageReference Include="NuGet.ProjectModel" Version="$(RefOnlyNugetProjectModelVersion)" />
</ItemGroup>

<Target Name="GenerateRuntimeJson" Condition="'$(AdditionalRuntimeIdentifiers)' != ''" BeforeTargets="Pack">
<Target Name="GenerateRuntimeJson" Condition="'$(AdditionalRuntimeIdentifiers)' != ''" BeforeTargets="GenerateNuspec">
<MakeDir Directories="$(IntermediateOutputPath)" />
<GenerateRuntimeGraph RuntimeGroups="@(RuntimeGroupWithQualifiers)"
AdditionalRuntimeIdentifiers="$(AdditionalRuntimeIdentifiers)"
Expand Down

0 comments on commit 3246f2f

Please sign in to comment.