Skip to content

Commit 584f789

Browse files
committed
Set appropriate version of package built from SDK projects
1 parent 1ac9af8 commit 584f789

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/Nerdbank.GitVersioning.NuGet/Nerdbank.GitVersioning.NuGet.nuproj

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<Content Include="..\NerdBank.GitVersioning\version.schema.json">
6363
<Link>tools\version.schema.json</Link>
6464
</Content>
65+
<Content Include="buildCrossTargeting\NerdBank.GitVersioning.targets" />
6566
<Content Include="build\dotnet\Nerdbank.GitVersioning.targets" />
6667
<Content Include="build\NerdBank.GitVersioning.targets" />
6768
<Content Include="build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets" />

src/Nerdbank.GitVersioning.NuGet/build/NerdBank.GitVersioning.targets

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</VersionDependsOn>
2020

2121
<GenerateNuspecDependsOn>
22-
GetNuPkgVersion;
22+
GetBuildVersion;
2323
$(GenerateNuspecDependsOn)
2424
</GenerateNuspecDependsOn>
2525

@@ -171,4 +171,9 @@
171171
<NuSpecProperties>$(NuSpecProperties);$(NuGetProperties);GitCommitIdShort=$(GitCommitIdShort)</NuSpecProperties>
172172
</PropertyGroup>
173173
</Target>
174+
175+
<!-- Workaround till https://github.com/NuGet/NuGet.Client/issues/1064 is merged and used. -->
176+
<Target Name="_NBGV_CalculateNuSpecVersionHelper"
177+
BeforeTargets="GenerateNuspec"
178+
DependsOnTargets="GetBuildVersion" />
174179
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\build\$(MSBuildThisFileName)$(MSBuildThisFileExtension)" />
4+
</Project>

0 commit comments

Comments
 (0)