Skip to content

Commit

Permalink
Attempt to fix versioning dependencies from NuGet/Home #4337
Browse files Browse the repository at this point in the history
See NuGet/Home#4337 for the issue. Kudos to @onovotny for an assist here.
  • Loading branch information
NickCraver committed Feb 17, 2018
1 parent a720fdb commit 6869cea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ if ($CreatePackages) {
Write-Host "Building all packages" -ForegroundColor "Green"
}

Write-Host "Doube restoring StackExchange.Exceptional.sln due to NuGet/Home #4337"
dotnet restore ".\StackExchange.Exceptional.sln"
dotnet restore ".\StackExchange.Exceptional.sln"

foreach ($project in $projectsToBuild) {
Write-Host "Working on $project`:" -ForegroundColor "Magenta"

Expand Down
10 changes: 10 additions & 0 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,14 @@
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.1.2" />
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.1.2" />
</ItemGroup>

<!-- https://github.com/NuGet/Home/issues/4337 -->
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' == 'true' ">
<Import Project="$(NuGetPackageRoot)\nerdbank.gitversioning\$(NerdbankGitVersioningVersion)\buildCrossTargeting\Nerdbank.GitVersioning.targets"
Condition="Exists('$(NuGetPackageRoot)\nerdbank.gitversioning\$(NerdbankGitVersioningVersion)\buildCrossTargeting\Nerdbank.GitVersioning.targets')" />
</ImportGroup>
<Target Name="FixUpVersion"
BeforeTargets="_GenerateRestoreProjectSpec"
DependsOnTargets="GetBuildVersion"
Condition=" '$(NerdbankGitVersioningTasksPath)' != '' " />
</Project>

0 comments on commit 6869cea

Please sign in to comment.