From 429ca32e6a1b9d2f929e32f139c6ccd2d570bea4 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 24 Jun 2025 18:36:12 +0200 Subject: [PATCH 1/2] expand .net framework applies to data --- PackageIndexer/CsvUtils.cs | 48 +++++++++++++++++++++++++ PackageIndexer/FindProjectsWithDocs.ps1 | 2 +- PackageIndexer/PackageIndexer.sln | 24 +++++++++++++ PackageIndexer/Program.cs | 2 +- 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 PackageIndexer/PackageIndexer.sln diff --git a/PackageIndexer/CsvUtils.cs b/PackageIndexer/CsvUtils.cs index 84783254..70335f99 100644 --- a/PackageIndexer/CsvUtils.cs +++ b/PackageIndexer/CsvUtils.cs @@ -111,11 +111,59 @@ internal void GenerateCSVFiles(string indexPackagesPath, string csvPath) AddCsvEntryToDict(opsMoniker, packageEntry, fellThroughFromVersion ?? "net10.0"); break; case "net462": + opsMoniker = s_tfmToOpsMoniker["net462"]; + AddCsvEntryToDict(opsMoniker, packageEntry, "net462"); + if (!packageEntry.Frameworks.Contains("net47")) + { + // Add to net47 moniker since this is a compatible framework. + fellThroughFromVersion = "net462"; + goto case "net47"; + } + break; case "net47": + opsMoniker = s_tfmToOpsMoniker["net47"]; + AddCsvEntryToDict(opsMoniker, packageEntry, fellThroughFromVersion ?? "net47"); + if (!packageEntry.Frameworks.Contains("net471")) + { + // Add to net471 moniker since this is a compatible framework. + fellThroughFromVersion = "net47"; + goto case "net471"; + } + break; case "net471": + opsMoniker = s_tfmToOpsMoniker["net471"]; + AddCsvEntryToDict(opsMoniker, packageEntry, fellThroughFromVersion ?? "net471"); + if (!packageEntry.Frameworks.Contains("net472")) + { + // Add to net472 moniker since this is a compatible framework. + fellThroughFromVersion = "net471"; + goto case "net472"; + } + break; case "net472": + opsMoniker = s_tfmToOpsMoniker["net472"]; + AddCsvEntryToDict(opsMoniker, packageEntry, fellThroughFromVersion ?? "net472"); + if (!packageEntry.Frameworks.Contains("net48")) + { + // Add to net48 moniker since this is a compatible framework. + fellThroughFromVersion = "net472"; + goto case "net48"; + } + break; case "net48": + opsMoniker = s_tfmToOpsMoniker["net48"]; + AddCsvEntryToDict(opsMoniker, packageEntry, fellThroughFromVersion ?? "net48"); + if (!packageEntry.Frameworks.Contains("net481")) + { + // Add to net481 moniker since this is a compatible framework. + fellThroughFromVersion = "net48"; + goto case "net481"; + } + break; case "net481": + opsMoniker = s_tfmToOpsMoniker["net481"]; + AddCsvEntryToDict(opsMoniker, packageEntry, fellThroughFromVersion ?? "net481"); + break; case "netstandard2.0": case "netstandard2.1": opsMoniker = s_tfmToOpsMoniker[targetFramework]; diff --git a/PackageIndexer/FindProjectsWithDocs.ps1 b/PackageIndexer/FindProjectsWithDocs.ps1 index cf4a573e..5d917e7d 100644 --- a/PackageIndexer/FindProjectsWithDocs.ps1 +++ b/PackageIndexer/FindProjectsWithDocs.ps1 @@ -1,4 +1,4 @@ -Get-ChildItem -Path "C:\path\to\runtime\src\libraries" -Recurse -Filter "*.csproj" -File | +Get-ChildItem -Path "C:\users\gewarren\runtime\src\libraries" -Recurse -Filter "*.csproj" -File | Where-Object { $_.FullName -notlike "*\ref\*" -and $_.FullName -notlike "*\tests\*" -and $_.FullName -notlike "*\gen\*" -and $_.FullName -notlike "*\shims\*" -and $_.FullName -notlike "*\tools\*" -and $_.FullName -notlike "*\System.Private*\*" -and $_.FullName -notlike "*\Fuzzing\*" -and $_.FullName -notlike "*\externals.csproj" -and $_.FullName -notlike "*\Microsoft.NETCore.Platforms\*" -and $_.BaseName -notlike "System.Threading.RateLimiting" -and $_.BaseName -notlike "Microsoft.XmlSerializer.Generator" } | ForEach-Object { $content = Get-Content -Path $_.FullName -Raw diff --git a/PackageIndexer/PackageIndexer.sln b/PackageIndexer/PackageIndexer.sln new file mode 100644 index 00000000..f495b44d --- /dev/null +++ b/PackageIndexer/PackageIndexer.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.2.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageIndexer", "PackageIndexer.csproj", "{5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {62B37454-8BD0-46BE-9386-0A96CAE43AEC} + EndGlobalSection +EndGlobal diff --git a/PackageIndexer/Program.cs b/PackageIndexer/Program.cs index a2d33d07..cc913ebf 100644 --- a/PackageIndexer/Program.cs +++ b/PackageIndexer/Program.cs @@ -8,7 +8,7 @@ internal static class Program private static async Task Main(string[] args) { #if DEBUG - args = [@"c:\users\gewarren\desktop\Package Index 0227", "preview"]; + args = [@"c:\users\gewarren\desktop\Package Index 0623", "preview"]; #endif if ((args.Length == 0) || (args.Length > 2)) From f25ba22847a572625df83e886aaf0fafe512e025 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 24 Jun 2025 18:41:11 +0200 Subject: [PATCH 2/2] reset files --- PackageIndexer/FindProjectsWithDocs.ps1 | 2 +- PackageIndexer/PackageIndexer.sln | 24 ------------------------ PackageIndexer/Program.cs | 2 +- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 PackageIndexer/PackageIndexer.sln diff --git a/PackageIndexer/FindProjectsWithDocs.ps1 b/PackageIndexer/FindProjectsWithDocs.ps1 index 5d917e7d..cf4a573e 100644 --- a/PackageIndexer/FindProjectsWithDocs.ps1 +++ b/PackageIndexer/FindProjectsWithDocs.ps1 @@ -1,4 +1,4 @@ -Get-ChildItem -Path "C:\users\gewarren\runtime\src\libraries" -Recurse -Filter "*.csproj" -File | +Get-ChildItem -Path "C:\path\to\runtime\src\libraries" -Recurse -Filter "*.csproj" -File | Where-Object { $_.FullName -notlike "*\ref\*" -and $_.FullName -notlike "*\tests\*" -and $_.FullName -notlike "*\gen\*" -and $_.FullName -notlike "*\shims\*" -and $_.FullName -notlike "*\tools\*" -and $_.FullName -notlike "*\System.Private*\*" -and $_.FullName -notlike "*\Fuzzing\*" -and $_.FullName -notlike "*\externals.csproj" -and $_.FullName -notlike "*\Microsoft.NETCore.Platforms\*" -and $_.BaseName -notlike "System.Threading.RateLimiting" -and $_.BaseName -notlike "Microsoft.XmlSerializer.Generator" } | ForEach-Object { $content = Get-Content -Path $_.FullName -Raw diff --git a/PackageIndexer/PackageIndexer.sln b/PackageIndexer/PackageIndexer.sln deleted file mode 100644 index f495b44d..00000000 --- a/PackageIndexer/PackageIndexer.sln +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.2.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageIndexer", "PackageIndexer.csproj", "{5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5BC87BC7-B59D-F6A7-2BC4-48EDEFA96F58}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {62B37454-8BD0-46BE-9386-0A96CAE43AEC} - EndGlobalSection -EndGlobal diff --git a/PackageIndexer/Program.cs b/PackageIndexer/Program.cs index cc913ebf..a2d33d07 100644 --- a/PackageIndexer/Program.cs +++ b/PackageIndexer/Program.cs @@ -8,7 +8,7 @@ internal static class Program private static async Task Main(string[] args) { #if DEBUG - args = [@"c:\users\gewarren\desktop\Package Index 0623", "preview"]; + args = [@"c:\users\gewarren\desktop\Package Index 0227", "preview"]; #endif if ((args.Length == 0) || (args.Length > 2))