Skip to content

Commit 6f58ced

Browse files
EvangelinkCopilot
andauthored
[rel/18.7] Skip nupkg verifier in .NET product build mode (#16092)
The binding redirect verifier in verify-nupkgs.ps1 fails in the dotnet/dotnet VMR build because source-built dependency packages have older AssemblyVersion stamps than NuGet.org packages (e.g. System.Runtime.CompilerServices.Unsafe ships as 6.0.0.0 from source-build but 6.0.3.0 from NuGet.org). The newVersion of a bindingRedirect must equal the AssemblyVersion of the DLL actually shipped beside the exe, so no single value can satisfy both the VMR/source-build pipeline (dnceng-public) and the internal pipeline (dnceng / NuGet.org-based) at the same time. Back-port the same skip already present on rel/18.8 and main: gate the _VerifyNuGetPackages target on DotNetBuild != 'true' so the VMR no longer runs the verifier, while the internal pipeline (which produces the actually- shipped packages) continues to validate the redirects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e4a393a commit 6f58ced

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

eng/AfterSolutionBuild.targets

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
<SourceBranchName Condition=" '$(SourceBranchName)' == '' ">dev</SourceBranchName>
55
</PropertyGroup>
66

7-
<Target Name="_VerifyNuGetPackages" AfterTargets="Pack" Condition=" '$(OS)' == 'Windows_NT' ">
7+
<!--
8+
Verify binding redirects and framework targeting in nupkgs.
9+
Skip in .NET product build mode: source-built dependency packages have different assembly versions
10+
than NuGet.org packages (e.g. System.Collections.Immutable 11.0.0-ci ships assembly version 9.0.0.0),
11+
so the binding redirect check produces false positives.
12+
-->
13+
<Target Name="_VerifyNuGetPackages" AfterTargets="Pack" Condition=" '$(OS)' == 'Windows_NT' and '$(DotNetBuild)' != 'true' ">
814
<Exec Command="powershell -NoProfile -NoLogo -ExecutionPolicy Bypass $(RepositoryEngineeringDir)\verify-nupkgs.ps1 -configuration $(Configuration) -versionPrefix $(versionPrefix) -currentBranch $(SourceBranchName)" />
915
</Target>
1016

0 commit comments

Comments
 (0)