Skip to content

Commit

Permalink
Generate Version even on --no-build (#33)
Browse files Browse the repository at this point in the history
If `--no-build` is specified we currently don't generate the props file. Fix that by using `BeforeBuild instead.

Register as TFM Specific Pack File. It isn't really, but this ensures the file is always generated and evaluated for inclusion in the package.
  • Loading branch information
iwillspeak committed Oct 11, 2021
1 parent fe848d6 commit 9290797
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Feersum.Sdk/Feersum.Sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
This target fabricates a simple props file in the build output directory
and includes it in the NuGet package next to the targets file. -->
<Target Name="GenerateVersionProps" BeforeTargets="Build" >

<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);GenerateVersionProps</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<Target Name="GenerateVersionProps" BeforeTargets="BeforeBuild;GenerateNuspec" DependsOnTargets="PrepareForBuild">
<Message Text="Creating package props for $(Version)" />

<PropertyGroup>
Expand All @@ -37,7 +42,7 @@

<ItemGroup>
<FileWrites Include="$(_PropsFile)" />
<None Include="$(_PropsFile)" Pack="true" PackagePath="targets/" />
<TfmSpecificPackageFile Include="$(_PropsFile)" Pack="true" PackagePath="targets/" />
</ItemGroup>

</Target>
Expand Down

0 comments on commit 9290797

Please sign in to comment.