Skip to content

Commit 0700d64

Browse files
committed
Use the NuGetPackOutput item for package validation
This is much simpler than manually combining PackageOutputPath + PackageId + PackageVersion Thanks to Nikolche Kolev for mentioning it in NuGet/Home#6671 (comment)
1 parent bd44f01 commit 0700d64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Serilog.Formatting.Log4Net.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<Target Name="ValidateNuGetPackage" AfterTargets="Pack">
6666
<!-- For reference: the file `.config/dotnet-tools.json` was created by running `dotnet new tool-manifest && dotnet tool install dotnet-validate` -->
6767
<Exec Command="dotnet tool restore" />
68-
<Exec Command="dotnet validate package local $([MSBuild]::EnsureTrailingSlash($(PackageOutputPath)))$(PackageId).$(PackageVersion).nupkg" />
68+
<Exec Command="dotnet validate package local %(NuGetPackOutput.FullPath)" Condition="'%(Extension)' == '.nupkg'" />
6969
</Target>
7070

7171
</Project>

0 commit comments

Comments
 (0)