diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs index d504a43a46d..cd908296125 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs @@ -671,10 +671,9 @@ private void LoadAssemblies(IEnumerable assemblies) private static IEnumerable InitDefaultRefAssemblies() { // Define number of reference assemblies distributed with PowerShell. - // This number is accurate as of PowerShell v7.1.0-preview.1 built with .NET v5.0.100-preview.1.20155.7 - const int numberOfPowershellRefAssemblies = 151; + const int maxPowershellRefAssemblies = 160; - const int capacity = numberOfPowershellRefAssemblies + 1; + const int capacity = maxPowershellRefAssemblies + 1; var defaultRefAssemblies = new List(capacity); foreach (string file in Directory.EnumerateFiles(s_netcoreAppRefFolder, "*.dll", SearchOption.TopDirectoryOnly))