Skip to content

Commit e53a7eb

Browse files
authored
Update framework package data (#1454)
* Update framework package data Porting changes from dotnet/sdk#49092 dotnet/sdk#49882 These improve the accuracy of the FrameworkPackages -- accounting for some packages which were removed from the shared framework, and representing the latest version of packages which were absorbed into the framework. * Update src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.cs
1 parent 92eea0e commit e53a7eb

9 files changed

+60
-18
lines changed

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,15 @@ private static FrameworkPackages LoadFrameworkPackagesFromPack(NuGetFramework fr
217217

218218
private void Add(string id, string version)
219219
{
220-
// intentionally redirect to indexer to allow for overwrite
221-
this.Packages[id] = NuGetVersion.Parse(version);
220+
if (string.IsNullOrWhiteSpace(version))
221+
{
222+
this.Packages.Remove(id);
223+
}
224+
else
225+
{
226+
// intentionally redirect to indexer to allow for overwrite
227+
this.Packages[id] = NuGetVersion.Parse(version);
228+
}
222229
}
223230

224231
public bool IsAFrameworkComponent(string id, NuGetVersion version) => this.Packages.TryGetValue(id, out var frameworkPackageVersion) && frameworkPackageVersion >= version;

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.net5.0.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal static class NETCoreApp50
1818
{ "System.Formats.Asn1", "5.0.0" },
1919
{ "System.IO.FileSystem.AccessControl", "5.0.0" },
2020
{ "System.Net.Http.Json", "5.0.0" },
21-
{ "System.Reflection.DispatchProxy", "4.7.1" },
21+
{ "System.Reflection.DispatchProxy", "4.8.2" },
2222
{ "System.Reflection.Metadata", "5.0.0" },
2323
{ "System.Runtime.CompilerServices.Unsafe", "5.0.0" },
2424
{ "System.Security.AccessControl", "5.0.0" },
@@ -29,6 +29,11 @@ internal static class NETCoreApp50
2929
{ "System.Text.Json", "5.0.0" },
3030
{ "System.Threading.Channels", "5.0.0" },
3131
{ "System.Threading.Tasks.Dataflow", "5.0.0" },
32+
33+
// removed packages
34+
{ "System.Runtime.InteropServices.WindowsRuntime", null },
35+
{ "System.Runtime.WindowsRuntime", null },
36+
{ "System.Runtime.WindowsRuntime.UI.Xaml", null },
3237
};
3338

3439
internal static FrameworkPackages AspNetCore { get; } = new(Net50, FrameworkNames.AspNetCoreApp, NETCoreApp31.AspNetCore)
@@ -167,6 +172,10 @@ internal static class NETCoreApp50
167172
{ "System.Security.Permissions", "5.0.0" },
168173
{ "System.Security.Principal.Windows", "5.0.0" },
169174
{ "System.Windows.Extensions", "5.0.0" },
175+
176+
// removed packages
177+
{ "Microsoft.Win32.SystemEvents", null },
178+
{ "System.Drawing.Common", null },
170179
};
171180

172181
internal static FrameworkPackages WindowsDesktop { get; } = new(Net50, FrameworkNames.WindowsDesktopApp, NETCoreApp31.WindowsDesktop)
@@ -194,6 +203,9 @@ internal static class NETCoreApp50
194203
{ "System.Security.Principal.Windows", "5.0.0" },
195204
{ "System.Threading.AccessControl", "5.0.0" },
196205
{ "System.Windows.Extensions", "5.0.0" },
206+
207+
// removed packages
208+
{ "System.Formats.Asn1", null },
197209
};
198210

199211
internal static void Register() => FrameworkPackages.Register(Instance, AspNetCore, WindowsDesktop);

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.net6.0.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal static class NETCoreApp60
1616
{ "System.Formats.Asn1", "6.0.0" },
1717
{ "System.Net.Http.Json", "6.0.0" },
1818
{ "System.Reflection.Metadata", "6.0.0" },
19-
{ "System.Runtime.CompilerServices.Unsafe", "6.0.0" },
19+
{ "System.Runtime.CompilerServices.Unsafe", "6.1.2" },
2020
{ "System.Security.AccessControl", "6.0.0" },
2121
{ "System.Text.Encoding.CodePages", "6.0.0" },
2222
{ "System.Text.Encodings.Web", "6.0.0" },
@@ -157,6 +157,14 @@ internal static class NETCoreApp60
157157
{ "System.IO.Pipelines", "6.0.0" },
158158
{ "System.Security.Cryptography.Pkcs", "6.0.0" },
159159
{ "System.Security.Cryptography.Xml", "6.0.0" },
160+
161+
// removed packages
162+
{ "Microsoft.Win32.Registry", null },
163+
{ "System.Security.AccessControl", null },
164+
{ "System.Security.Cryptography.Cng", null },
165+
{ "System.Security.Permissions", null },
166+
{ "System.Security.Principal.Windows", null },
167+
{ "System.Windows.Extensions", null },
160168
};
161169

162170
internal static FrameworkPackages WindowsDesktop { get; } = new(Net60, FrameworkNames.WindowsDesktopApp, NETCoreApp50.WindowsDesktop)
@@ -176,6 +184,14 @@ internal static class NETCoreApp60
176184
{ "System.Security.Permissions", "6.0.0" },
177185
{ "System.Threading.AccessControl", "6.0.0" },
178186
{ "System.Windows.Extensions", "6.0.0" },
187+
188+
// removed packages
189+
{ "Microsoft.Win32.Registry", null },
190+
{ "System.IO.FileSystem.AccessControl", null },
191+
{ "System.IO.Pipes.AccessControl", null },
192+
{ "System.Security.AccessControl", null },
193+
{ "System.Security.Cryptography.Cng", null },
194+
{ "System.Security.Principal.Windows", null },
179195
};
180196

181197
internal static void Register() => FrameworkPackages.Register(Instance, AspNetCore, WindowsDesktop);

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.net9.0.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ internal static class NETCoreApp90
178178
{ "System.Security.Cryptography.Pkcs", "8.0.1" },
179179
{ "System.Security.Cryptography.Xml", "9.0.0" },
180180
{ "System.Threading.RateLimiting", "9.0.0" },
181+
182+
// removed packages
183+
{ "System.IO.Pipelines", null },
181184
};
182185

183186
internal static FrameworkPackages WindowsDesktop { get; } = new(Net90, FrameworkNames.WindowsDesktopApp, NETCoreApp80.WindowsDesktop)

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.netcoreapp2.1.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ internal static class NETCoreApp21
1515
{ "Microsoft.NETCore.App", "2.1.0" },
1616
{ "Microsoft.VisualBasic", "10.3.0" },
1717
{ "Microsoft.Win32.Registry", "4.5.0" },
18-
{ "System.Buffers", "4.5.0" },
18+
{ "System.Buffers", "4.6.1" },
1919
{ "System.Collections.Immutable", "1.5.0" },
2020
{ "System.ComponentModel.Annotations", "4.5.0" },
2121
{ "System.Diagnostics.DiagnosticSource", "4.5.0" },
2222
{ "System.IO.FileSystem.AccessControl", "4.5.0" },
2323
{ "System.IO.Pipes.AccessControl", "4.5.0" },
24-
{ "System.Memory", "4.5.5" },
25-
{ "System.Numerics.Vectors", "4.5.0" },
24+
{ "System.Memory", "4.6.3" },
25+
{ "System.Numerics.Vectors", "4.6.1" },
2626
{ "System.Reflection.DispatchProxy", "4.5.0" },
2727
{ "System.Reflection.Metadata", "1.6.0" },
2828
{ "System.Security.AccessControl", "4.5.0" },
2929
{ "System.Security.Cryptography.Cng", "4.5.2" },
3030
{ "System.Security.Cryptography.OpenSsl", "4.5.0" },
3131
{ "System.Security.Principal.Windows", "4.5.0" },
3232
{ "System.Threading.Tasks.Dataflow", "4.9.0" },
33-
{ "System.Threading.Tasks.Extensions", "4.5.4" },
34-
{ "System.ValueTuple", "4.5.0" },
33+
{ "System.Threading.Tasks.Extensions", "4.6.3" },
34+
{ "System.ValueTuple", "4.6.1" },
3535
};
3636

3737
internal static void Register() => FrameworkPackages.Register(Instance);

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.netcoreapp3.0.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal static class NETCoreApp30
1313
{
1414
{ "Microsoft.CSharp", "4.6.0" },
1515
{ "Microsoft.Win32.Registry", "4.6.0" },
16-
{ "System.Buffers", "4.5.1" },
16+
{ "System.Buffers", "4.6.1" },
1717
{ "System.Collections.Immutable", "1.6.0" },
1818
{ "System.ComponentModel.Annotations", "4.6.0" },
1919
{ "System.Data.DataSetExtensions", "4.5.0" },
@@ -28,7 +28,9 @@ internal static class NETCoreApp30
2828
{ "System.Security.AccessControl", "4.6.0" },
2929
{ "System.Security.Cryptography.Cng", "4.6.0" },
3030
{ "System.Security.Cryptography.OpenSsl", "4.6.0" },
31-
{ "System.Security.Cryptography.Xml", "4.4.0" },
31+
32+
// this package was listed in the package overrides.txt for netcoreapp3.0, but it is not actually in the targeting pack
33+
// { "System.Security.Cryptography.Xml", "4.4.0" },
3234
{ "System.Security.Principal.Windows", "4.6.0" },
3335
{ "System.Text.Encoding.CodePages", "4.6.0" },
3436
{ "System.Text.Encodings.Web", "4.6.0" },

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.netcoreapp3.1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal static class NETCoreApp31
1717
{ "System.ComponentModel.Annotations", "4.7.0" },
1818
{ "System.Diagnostics.DiagnosticSource", "4.7.0" },
1919
{ "System.IO.FileSystem.AccessControl", "4.7.0" },
20-
{ "System.Reflection.DispatchProxy", "4.7.0" },
20+
{ "System.Reflection.DispatchProxy", "4.8.2" },
2121
{ "System.Reflection.Metadata", "1.8.0" },
2222
{ "System.Runtime.CompilerServices.Unsafe", "4.7.1" },
2323
{ "System.Runtime.WindowsRuntime", "4.7.0" },

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.netstandard2.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ internal static class NETStandard20
9696
{ "System.Threading.Thread", "4.3.0" },
9797
{ "System.Threading.ThreadPool", "4.3.0" },
9898
{ "System.Threading.Timer", "4.3.0" },
99-
{ "System.ValueTuple", "4.4.0" },
99+
{ "System.ValueTuple", "4.6.1" },
100100
{ "System.Xml.ReaderWriter", "4.3.1" },
101101
{ "System.Xml.XDocument", "4.0.11" },
102102
{ "System.Xml.XmlDocument", "4.3.0" },

src/Microsoft.ComponentDetection.Detectors/nuget/FrameworkPackages/FrameworkPackages.netstandard2.1.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal static class NETStandard21
1111
{
1212
internal static FrameworkPackages Instance { get; } = new(NetStandard21, FrameworkNames.NetStandardLibrary, NETStandard20.Instance)
1313
{
14-
{ "System.Buffers", "4.5.1" },
14+
{ "System.Buffers", "4.6.1" },
1515
{ "System.Collections.Concurrent", "4.3.0" },
1616
{ "System.Collections.Immutable", "1.4.0" },
1717
{ "System.ComponentModel", "4.3.0" },
@@ -20,10 +20,10 @@ internal static class NETStandard21
2020
{ "System.Diagnostics.Contracts", "4.3.0" },
2121
{ "System.Dynamic.Runtime", "4.3.0" },
2222
{ "System.Linq.Queryable", "4.3.0" },
23-
{ "System.Memory", "4.5.5" },
23+
{ "System.Memory", "4.6.3" },
2424
{ "System.Net.Requests", "4.3.0" },
2525
{ "System.Net.WebHeaderCollection", "4.3.0" },
26-
{ "System.Numerics.Vectors", "4.5.0" },
26+
{ "System.Numerics.Vectors", "4.6.1" },
2727
{ "System.ObjectModel", "4.3.0" },
2828
{ "System.Private.DataContractSerialization", "4.3.0" },
2929
{ "System.Reflection.DispatchProxy", "4.5.1" },
@@ -35,11 +35,13 @@ internal static class NETStandard21
3535
{ "System.Runtime.Numerics", "4.3.0" },
3636
{ "System.Runtime.Serialization.Json", "4.3.0" },
3737
{ "System.Security.AccessControl", "4.4.0" },
38-
{ "System.Security.Cryptography.Xml", "4.4.0" },
38+
39+
// this package was listed in the package overrides.txt for netstandard2.1, but it is not actually in the targeting pack
40+
// { "System.Security.Cryptography.Xml", "4.4.0" },
3941
{ "System.Security.Principal", "4.3.0" },
4042
{ "System.Security.Principal.Windows", "4.4.0" },
4143
{ "System.Threading", "4.3.0" },
42-
{ "System.Threading.Tasks.Extensions", "4.5.4" },
44+
{ "System.Threading.Tasks.Extensions", "4.6.3" },
4345
{ "System.Threading.Tasks.Parallel", "4.3.0" },
4446
{ "System.Xml.XDocument", "4.3.0" },
4547
{ "System.Xml.XmlSerializer", "4.3.0" },

0 commit comments

Comments
 (0)