diff --git a/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs b/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs index 76c4233795d..99a66ce4e2d 100644 --- a/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs +++ b/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs @@ -381,7 +381,16 @@ public override Task GetArchiveHashAsync(HashAlgorithmName hashAlgorithm public override bool CanVerifySignedPackages(SignedPackageVerifierSettings verifierSettings) { #if IS_SIGNING_SUPPORTED - return true; + // Mono support has been deprioritized, so verification on Mono is not enabled, tracking issue: https://github.com/NuGet/Home/issues/9027 + if (RuntimeEnvironmentHelper.IsMono) + { + return false; + } + else + { + return true; + } + #else return false; #endif diff --git a/test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetVerifyCommandTest.cs b/test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetVerifyCommandTest.cs index a40b1660dba..41b92e0ee25 100644 --- a/test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetVerifyCommandTest.cs +++ b/test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetVerifyCommandTest.cs @@ -58,7 +58,7 @@ public void VerifyCommand_WrongInput_NotFound() } } - [Fact] + [PlatformFact(Platform.Windows, SkipMono = true)] public void VerifyCommand_WithAuthorSignedPackage_FailsGracefully() { var nugetExe = Util.GetNuGetExePath();