Skip to content

Commit 9290797

Browse files
authored
Generate Version even on --no-build (#33)
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.
1 parent fe848d6 commit 9290797

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Feersum.Sdk/Feersum.Sdk.proj

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
2020
This target fabricates a simple props file in the build output directory
2121
and includes it in the NuGet package next to the targets file. -->
22-
<Target Name="GenerateVersionProps" BeforeTargets="Build" >
22+
23+
<PropertyGroup>
24+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);GenerateVersionProps</TargetsForTfmSpecificContentInPackage>
25+
</PropertyGroup>
26+
27+
<Target Name="GenerateVersionProps" BeforeTargets="BeforeBuild;GenerateNuspec" DependsOnTargets="PrepareForBuild">
2328
<Message Text="Creating package props for $(Version)" />
2429

2530
<PropertyGroup>
@@ -37,7 +42,7 @@
3742

3843
<ItemGroup>
3944
<FileWrites Include="$(_PropsFile)" />
40-
<None Include="$(_PropsFile)" Pack="true" PackagePath="targets/" />
45+
<TfmSpecificPackageFile Include="$(_PropsFile)" Pack="true" PackagePath="targets/" />
4146
</ItemGroup>
4247

4348
</Target>

0 commit comments

Comments
 (0)