Skip to content

Commit 7a95040

Browse files
committed
address feedback, add more
1 parent 56629cc commit 7a95040

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/NuGet.Core/NuGet.Commands/RestoreCommand/RestoreCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ internal static void PopulatePruningEnabledTelemetry(PackageSpec project, Teleme
409409
{
410410
bool isPruningEnabled = framework.PackagesToPrune.Count > 0;
411411
bool isNetCoreAppFramework = StringComparer.OrdinalIgnoreCase.Equals(framework.FrameworkName.Framework, FrameworkConstants.FrameworkIdentifiers.NetCoreApp);
412-
// All .NETCoreApp, .NET Standard >= 2.0 , and .NET Framework >= 4.6.1 projects are compatible with package pruning.
413-
bool isPruningCompatibleFramework = isNetCoreAppFramework ||
412+
// .NETCoreApp >= 2.0, .NET Standard >= 2.0 are compatible with package pruning.
413+
bool isPruningCompatibleFramework = (isNetCoreAppFramework && framework.FrameworkName.Version.Major >= 2 ) ||
414414
(StringComparer.OrdinalIgnoreCase.Equals(framework.FrameworkName.Framework, FrameworkConstants.FrameworkIdentifiers.NetStandard) &&
415415
framework.FrameworkName.Version.Major >= 2);
416416

test/NuGet.Core.Tests/NuGet.Commands.Test/RestoreCommandTests/RestoreCommandTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3104,8 +3104,8 @@ await SimpleTestPackageUtility.CreateFolderFeedV3Async(
31043104
projectInformationEvent["UpdatedMSBuildFiles"].Should().Be(false);
31053105
projectInformationEvent["NETSdkVersion"].Should().Be(NuGetVersion.Parse("10.0.100"));
31063106
projectInformationEvent["Pruning.FrameworksEnabled.Count"].Should().Be(0);
3107-
projectInformationEvent["Pruning.FrameworksDisabled.Count"].Should().Be(1);
3108-
projectInformationEvent["Pruning.FrameworksUnsupported.Count"].Should().Be(0);
3107+
projectInformationEvent["Pruning.FrameworksDisabled.Count"].Should().Be(0);
3108+
projectInformationEvent["Pruning.FrameworksUnsupported.Count"].Should().Be(1);
31093109
projectInformationEvent["Pruning.DefaultEnabled"].Should().Be(false);
31103110
projectInformationEvent["UsesLegacyPackagesDirectory"].Should().Be(false);
31113111
}

0 commit comments

Comments
 (0)