Skip to content

Commit 2304819

Browse files
committed
Fix package prune data for .NET Core 2.x
1 parent d75bb97 commit 2304819

File tree

5 files changed

+3
-13
lines changed

5 files changed

+3
-13
lines changed

src/Microsoft.CodeAnalysis.NetAnalyzers/src/RulesMissingDocumentation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@
22

33
Rule ID | Missing Help Link | Title |
44
--------|-------------------|-------|
5-
CA1873 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1873> | Avoid potentially expensive logging |
6-
CA1874 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1874> | Use 'Regex.IsMatch' |
7-
CA1875 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1875> | Use 'Regex.Count' |
8-
CA2023 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2023> | Invalid braces in message template |

src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.netcoreapp2.0.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ internal static class NETCoreApp20
1414
internal static FrameworkPackages Instance { get; } = new(NetCoreApp20, FrameworkNames.NetCoreApp, NETStandard20.Instance)
1515
{
1616
{ "Microsoft.CSharp", "4.4.0" },
17-
{ "Microsoft.NETCore.App", "2.0.0" },
1817
{ "Microsoft.VisualBasic", "10.2.0" },
1918
{ "Microsoft.Win32.Registry", "4.4.0" },
2019
{ "runtime.any.System.Collections", "4.3.0" },

src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.netcoreapp2.1.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ internal static class NETCoreApp21
1414
internal static FrameworkPackages Instance { get; } = new(NetCoreApp21, FrameworkNames.NetCoreApp, NETCoreApp20.Instance)
1515
{
1616
{ "Microsoft.CSharp", "4.5.0" },
17-
{ "Microsoft.NETCore.App", "2.1.0" },
1817
{ "Microsoft.VisualBasic", "10.3.0" },
1918
{ "Microsoft.Win32.Registry", "4.5.0" },
2019
{ "System.Buffers", "4.6.1" },

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ Copyright (c) .NET Foundation. All rights reserved.
5555
<!-- Package pruning is expected to be enable for all TFMs for multi-targeted projects, so still generate the pruning data when RestoreEnablePackagePruning is '' which implies a multi-targeted project. -->
5656
<Target Name="AddPrunePackageReferences" BeforeTargets="CollectPrunePackageReferences"
5757
DependsOnTargets="ProcessFrameworkReferences"
58-
Condition="('$(RestoreEnablePackagePruning)' == 'true' OR '$(RestoreEnablePackagePruning)' == '')
59-
AND (('$(TargetFrameworkIdentifier)' == '.NETCoreApp'
60-
AND '$(TargetFrameworkVersion)' != ''
61-
AND $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0')))
62-
OR ('$(TargetFrameworkIdentifier)' != '.NETCoreApp'))">
58+
Condition="'$(RestoreEnablePackagePruning)' == 'true' OR '$(RestoreEnablePackagePruning)' == ''">
6359
<PropertyGroup>
6460
<PrunePackageDataRoot Condition="'$(PrunePackageDataRoot)' == ''">$(NetCoreRoot)\sdk\$(NETCoreSdkVersion)\PrunePackageData\</PrunePackageDataRoot>
6561
<PrunePackageTargetingPackRoots Condition="'$(PrunePackageTargetingPackRoots)' == ''">$(NetCoreTargetingPackRoot)</PrunePackageTargetingPackRoots>

test/Microsoft.NET.Build.Tests/GivenThatWeWantToResolveConflicts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ public void PlatformPackagesCanBePruned(bool prunePackages)
320320
[InlineData("net6.0")]
321321
[InlineData("netcoreapp3.1")]
322322
[InlineData("netcoreapp3.0")]
323-
[InlineData("netcoreapp2.1", false)] //TODO: https://github.com/dotnet/sdk/issues/49917
324-
[InlineData("netcoreapp2.0", false)] //TODO: https://github.com/dotnet/sdk/issues/49917
323+
[InlineData("netcoreapp2.1", true)]
324+
[InlineData("netcoreapp2.0", true)]
325325
[InlineData("netcoreapp1.1", false)]
326326
[InlineData("netcoreapp1.0", false)]
327327
[InlineData("netstandard2.1")]

0 commit comments

Comments
 (0)