Signing: enable NuGet signature verification by default on Linux #31868
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: wait for NuGet's automated test results for .NET 8 SDK before merging this PR.
Resolves NuGet/Home#11262
This change enables NuGet signed package verification by default on Linux in .NET 8 SDK. Because NuGet.Client dual-inserts into both .NET 7 and 8 SDK's, NuGet needed a way to enable verification by default only in .NET 8 SDK not .NET 7 SDK. Since .NET SDK's
main
branch is .NET 8, this change does that by setting NuGet's environment variableDOTNET_NUGET_SIGNATURE_VERIFICATION
totrue
in all NuGet code paths except when the variable is already set tofalse
(because a user explicitly opted out).The new NuGet warning NU3042 should make new failures on Linux resulting from this change actionable.
@nkolev92 informally reviewed and blessed this change before his OOF-ness.
CC @dotnet/nuget-team, @aortiz-msft, @skofman1