·
          
            16 commits
          
          to main
          since this release
        
        
        
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-06-28 Revert "update assembly version"
- 2025-06-28 update assembly version
- 2025-06-28 add option '--use-built-in-type-alias'
- 2025-06-28 fix typo
- 2025-06-28 bump System.CommandLine up to 2.0.0-beta5.25306.1
- 2025-06-28 update assembly version
- 2025-06-28 add option '--generate-records' to improve generating of record types
- 2025-06-25 fix typo and replace to more better word
- 2025-06-25 bump dependencies
- 2025-04-21 fix typo in comment
- 2024-12-14 drop target framework net6.0
Full changes
Full changes in this release:
diff --git a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Build/ProjectBuilder.cs b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Build/ProjectBuilder.cs
index d9e5e7c..3416446 100644
--- a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Build/ProjectBuilder.cs
+++ b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Build/ProjectBuilder.cs
@@ -117,7 +117,7 @@ public static class ProjectBuilder {
           yield return new FileInfo(innerOutputFullPath);
         }
 
-        // retrieve Build target result / for in cace of building with single target framework
+        // retrieve Build target result / for in case of building with single target framework
         if (result.HasResultsForTarget("Build")) {
           var buildTargetResult = result.ResultsByTarget["Build"];
 
diff --git a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.csproj b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.csproj
index 0ec0875..567939c 100644
--- a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.csproj
+++ b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.csproj
@@ -6,12 +6,12 @@ SPDX-License-Identifier: MIT
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <PackAsTool>true</PackAsTool>
-    <TargetFrameworks>net8.0;net6.0<!-- ;net472 --></TargetFrameworks>
+    <TargetFrameworks>net8.0<!-- ;net472 --></TargetFrameworks>
     <AssemblyName>Smdn.Reflection.ReverseGenerating.ListApi</AssemblyName>
     <ToolCommandName>list-api</ToolCommandName>
-    <VersionPrefix>1.3.0</VersionPrefix>
+    <VersionPrefix>1.4.0</VersionPrefix>
     <VersionSuffix></VersionSuffix>
-    <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0030 -->
+    <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0130 -->
     <Nullable>enable</Nullable>
     <NoWarn>CS1591;$(NoWarn)</NoWarn> <!-- CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -->
     <NoWarn>CS2002;$(NoWarn)</NoWarn> <!-- see target 'WriteConstantsFile' -->
@@ -34,26 +34,23 @@ SPDX-License-Identifier: MIT
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
+    <PackageReference Include="System.CommandLine" Version="2.0.0-beta5.25306.1" />
     <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" Condition="$(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('netcoreapp'))" />
     <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" Condition="$(TargetFramework.StartsWith('net8.'))" />
 
-    <ProjectOrPackageReference ReferencePackageVersion="[1.3.0,2.0.0)" Include="..\Smdn.Reflection.ReverseGenerating.ListApi.Core\Smdn.Reflection.ReverseGenerating.ListApi.Core.csproj" />
+    <ProjectOrPackageReference ReferencePackageVersion="[1.4.0,2.0.0)" Include="..\Smdn.Reflection.ReverseGenerating.ListApi.Core\Smdn.Reflection.ReverseGenerating.ListApi.Core.csproj" />
   </ItemGroup>
 
   <ItemGroup Condition=" '$(EnableFeature_BuildProjectFile)' == 'True' ">
-    <!-- Overrides the package version of Newtonsoft.Json which NuGet.Packaging refers to -->
-    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
-
     <PackageReference Include="System.Runtime.Loader" Version="4.3.0" Condition="$(TargetFramework.StartsWith('net4'))" />
-    <PackageReference Include="Microsoft.Build" Version="16.11.0" />
-    <PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.11.0" />
-    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="16.11.0" />
+    <PackageReference Include="Microsoft.Build" Version="17.11.31" />
+    <PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.11.31" />
+    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.11.31" />
     <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" Condition="$(TargetFramework.StartsWith('net6.'))" />
     <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" Condition="$(TargetFramework.StartsWith('net7.'))" />
     <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" Condition="$(TargetFramework.StartsWith('net8.'))" />
     <PackageReference Include="Microsoft.NET.HostModel" Version="3.1.16" />
-    <PackageReference Include="NuGet.ProjectModel" Version="5.11.0" />
+    <PackageReference Include="NuGet.ProjectModel" Version="6.14.0" />
     <PackageReference Include="Smdn.Fundamental.Shell" Version="3.0.0" />
   </ItemGroup>
 
diff --git a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/Program.cs b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/Program.cs
index 20cd597..7400b05 100644
--- a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/Program.cs
+++ b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/Program.cs
@@ -1,10 +1,6 @@
 // SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp>
 // SPDX-License-Identifier: MIT
 using System;
-using System.CommandLine;
-using System.CommandLine.Builder;
-using System.CommandLine.Parsing;
-using System.Reflection;
 
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
@@ -28,33 +24,17 @@ internal sealed class Program {
     using var serviceProvider = services.BuildServiceProvider();
 
     var rootCommand = new RootCommandImplementation(serviceProvider).CreateCommand();
-    var builder =
-      new CommandLineBuilder(rootCommand)
-      .UseDefaults()
-      .UseExceptionHandler(
-        onException: static (ex, context) => {
-          Exception? caughtException = ex;
-
-          if (ex is TargetInvocationException exTargetInvocation)
-            caughtException = exTargetInvocation.InnerException;
-
-          switch (caughtException) {
-            case InvalidCommandOperationException exInvalidCommandOperation:
-              Console.Error.WriteLine(exInvalidCommandOperation.Message);
-              break;
-
-            case CommandOperationNotSupportedException exCommandOperationNotSupported:
-              Console.Error.WriteLine(exCommandOperationNotSupported.Message);
-              break;
-
-            default:
-              Console.Error.WriteLine(caughtException);
-              break;
-          }
-        },
-        errorExitCode: -1
-      );
 
-    return builder.Build().Invoke(args);
+    try {
+      return rootCommand.Parse(args).Invoke();
+    }
+    catch (InvalidCommandOperationException ex) {
+      Console.Error.WriteLine(ex.Message);
+      return -1;
+    }
+    catch (CommandOperationNotSupportedException ex) {
+      Console.Error.WriteLine(ex.Message);
+      return -1;
+    }
   }
 }
diff --git a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.cs b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.cs
index 4ae99be..e94c77a 100644
--- a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.cs
+++ b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.cs
@@ -5,9 +5,6 @@
 using System;
 using System.Collections.Generic;
 using System.CommandLine;
-using System.CommandLine.Builder;
-using System.CommandLine.Invocation;
-using System.CommandLine.Parsing;
 #if NULL_STATE_STATIC_ANALYSIS_ATTRIBUTES
 using System.Diagnostics.CodeAnalysis;
 #endif
@@ -16,6 +13,7 @@ using System.Linq;
 using System.Reflection;
 using System.Runtime.Versioning;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 
 using Microsoft.Extensions.DependencyInjection;
@@ -27,82 +25,81 @@ using Smdn.Reflection.ReverseGenerating.ListApi.Build;
 
 namespace Smdn.Reflection.ReverseGenerating.ListApi;
 
-public sealed class RootCommandImplementation : ICommandHandler {
+public sealed class RootCommandImplementation {
   public static readonly string DefaultBuildConfiguration = "Release";
 
-  private static readonly Argument<FileSystemInfo> ArgumentInput = new Argument<FileSystemInfo>(
-    name: "input",
+  private static readonly Argument<FileSystemInfo> ArgumentInput = new Argument<FileSystemInfo>("input") {
 #if FEATURE_BUILD_PROJ
-    description: "Path to project/solution/assembly file to generate the API list. The command will search for an project file from the current directory if not specified, or search from the directory if a directory is specified.",
+    Description = "Path to project/solution/assembly file to generate the API list. The command will search for an project file from the current directory if not specified, or search from the directory if a directory is specified.",
 #else
-    description: "Path to an assembly file to generate the API list.",
+    Description = "Path to an assembly file to generate the API list.",
 #endif
-    getDefaultValue: static () => new DirectoryInfo(Environment.CurrentDirectory)
-  ) {
+    DefaultValueFactory = static _ => new DirectoryInfo(Environment.CurrentDirectory),
     // Arity = ArgumentArity.OneOrMore
     Arity = ArgumentArity.ExactlyOne,
   }
-  .ExistingOnly();
+  .AcceptExistingOnly();
 
 #if FEATURE_BUILD_PROJ
-  private static readonly Option<string?> OptionConfiguration = new(
-    aliases: new[] { "-c", "--configuration" },
-    description: "The 'build configuration' option passed to `Build` target when the project will be built.",
-    getDefaultValue: static () => DefaultBuildConfiguration
-  );
-  private static readonly Option<string?> OptionTargetFramework = new(
-    aliases: new[] { "-f", "--framework" },
-    description: "The 'target framework' option passed to `Build` target when the project will be built.",
-    getDefaultValue: static () => null
-  );
-  private static readonly Option<string?> OptionRuntimeIdentifier = new(
-    aliases: new[] { "-r", "--runtime" },
-    description: "The 'target runtime' option passed to `Build` target when the project will be built.",
-    getDefaultValue: static () => null
-  );
+  private static readonly Option<string?> OptionConfiguration = new("--configuration", "-c") {
+    Description = "The 'build configuration' option passed to `Build` target when the project will be built.",
+    DefaultValueFactory = static _ => DefaultBuildConfiguration,
+  };
+  private static readonly Option<string?> OptionTargetFramework = new("--framework", "-f") {
+    Description = "The 'target framework' option passed to `Build` target when the project will be built.",
+    DefaultValueFactory = static _ => null,
+  };
+  private static readonly Option<string?> OptionRuntimeIdentifier = new("--runtime", "-r") {
+    Description = "The 'target runtime' option passed to `Build` target when the project will be built.",
+    DefaultValueFactory = static _ => null,
+  };
 #if false
   private static readonly Option<string?> OptionOS = new(
     aliases: new[] { "--os" },
     description: "The 'target operating system' option passed to `Build` target when the project will be built.",
-    getDefaultValue: static () => null
+    DefaultValueFactory = static _ => null,
   );
 #endif
 #endif // FEATURE_BUILD_PROJ
-  private static readonly Option<DirectoryInfo> OptionOutputDirectory = new(
-    aliases: new[] { "-o", "--output-directory" },
-    description: "Path to output directory.",
-    getDefaultValue: static () => new DirectoryInfo(Environment.CurrentDirectory)
-  );
-  private static readonly Option<bool> OptionLoadAssemblyIntoReflectionOnlyContext = new(
-    aliases: new[] { "--load-reflection-only" },
-    description: "Loads and processes input assemblies in the reflection-only context.",
-    getDefaultValue: static () =>
+  private static readonly Option<DirectoryInfo> OptionOutputDirectory = new("--output-directory", "-o") {
+    Description = "Path to output directory.",
+    DefaultValueFactory = static _ => new DirectoryInfo(Environment.CurrentDirectory),
+  };
+  private static readonly Option<bool> OptionLoadAssemblyIntoReflectionOnlyContext = new("--load-reflection-only") {
+    Description = "Loads and processes input assemblies in the reflection-only context.",
+    DefaultValueFactory = static _ =>
 #if NETFRAMEWORK
-      true
+      true,
 #else
-      false
+      false,
 #endif
-  );
-  private static readonly Option<bool> OptionGenerateFullTypeName = new(
-    aliases: new[] { "--generate-fulltypename" },
-    description: "Generates declarations with full type name.",
-    getDefaultValue: static () => false
-  );
-  private static readonly Option<MethodBodyOption> OptionGenerateMethodBody = new(
-    aliases: new[] { "--generate-methodbody" },
-    description: "Generates method body with specified type of implementation.",
-    getDefaultValue: static () => MethodBodyOption.EmptyImplementation
-  );
-  private static readonly Option<bool> OptionGenerateStaticMembersFirst = new(
-    aliases: new[] { "--generate-staticmembersfirst" },
-    description: "Generates member declarations in the order of the static members first.",
-    getDefaultValue: static () => false
-  );
-  private static readonly Option<bool> OptionGenerateNullableAnnotations = new(
-    aliases: new[] { "--generate-nullableannotations" },
-    description: "Generates declarations with nullable annotations.",
-    getDefaultValue: static () => true
-  );
+  };
+  // cSpell:disable
+  private static readonly Option<bool> OptionGenerateFullTypeName = new("--generate-fulltypename") {
+    Description = "Generates declarations with full type name.",
+    DefaultValueFactory = static _ => false,
+  };
+  private static readonly Option<MethodBodyOption> OptionGenerateMethodBody = new("--generate-methodbody") {
+    Description = "Generates method body with specified type of implementation.",
+    DefaultValueFactory = static _ => MethodBodyOption.EmptyImplementation,
+  };
+  private static readonly Option<bool> OptionGenerateStaticMembersFirst = new("--generate-staticmembersfirst") {
+    Description = "Generates member declarations in the order of the static members first.",
+    DefaultValueFactory = static _ => false,
+  };
+  private static readonly Option<bool> OptionGenerateNullableAnnotations = new("--generate-nullableannotations") {
+    Description = "Generates declarations with nullable annotations.",
+    DefaultValueFactory = static _ => true,
+  };
+  private static readonly Option<bool> OptionGenerateRecords = new("--generate-records") {
+    Description = "Generates record type declarations and hides compiler-generated members.",
+    DefaultValueFactory = static _ => true,
+  };
+  private static readonly Option<bool> OptionTranslateLanguagePrimitiveType = new("--use-built-in-type-alias") {
+    Description = "Use aliases for C# built-in types rather than .NET type names.",
+    DefaultValueFactory = static _ => false,
+  };
+  // cSpell:enable
 
   private readonly Microsoft.Extensions.Logging.ILogger? logger;
 
@@ -128,15 +125,17 @@ public sealed class RootCommandImplementation : ICommandHandler {
       OptionGenerateMethodBody,
       OptionGenerateStaticMembersFirst,
       OptionGenerateNullableAnnotations,
+      OptionGenerateRecords,
+      OptionTranslateLanguagePrimitiveType,
     };
 
-    rootCommand.Handler = this;
+    rootCommand.SetAction(RunAsync);
 
     return rootCommand;
   }
 
   private ParseResult ParseCommandLineArgs(string[] args)
-    => new CommandLineBuilder(CreateCommand()).UseDefaults().Build().Parse(args);
+    => CreateCommand().Parse(args);
 
   // <remarks>This method is for testing purposes.</remarks>
   public ApiListWriterOptions GetApiListWriterOptions(string[] args)
@@ -147,17 +146,23 @@ public sealed class RootCommandImplementation : ICommandHandler {
     var options = new ApiListWriterOptions();
 
 #pragma warning disable IDE0055
-    options.TypeDeclaration.WithNamespace       = parseResult.GetValueForOption(OptionGenerateFullTypeName);
-    options.MemberDeclaration.WithNamespace     = parseResult.GetValueForOption(OptionGenerateFullTypeName);
-    options.AttributeDeclaration.WithNamespace  = parseResult.GetValueForOption(OptionGenerateFullTypeName);
+    options.TranslateLanguagePrimitiveTypeDeclaration = parseResult.GetValue(OptionTranslateLanguagePrimitiveType);
 
-    var methodBody = parseResult.GetValueForOption(OptionGenerateMethodBody);
+    options.TypeDeclaration.WithNamespace       = parseResult.GetValue(OptionGenerateFullTypeName);
+    options.MemberDeclaration.WithNamespace     = parseResult.GetValue(OptionGenerateFullTypeName);
+    options.AttributeDeclaration.WithNamespace  = parseResult.GetValue(OptionGenerateFullTypeName);
+
+    var methodBody = parseResult.GetValue(OptionGenerateMethodBody);
 
     options.MemberDeclaration.MethodBody        = methodBody;
     options.MemberDeclaration.AccessorBody      = methodBody;
 
-    options.Writer.OrderStaticMembersFirst          = parseResult.GetValueForOption(OptionGenerateStaticMembersFirst);
-    options.Writer.WriteNullableAnnotationDirective = parseResult.GetValueForOption(OptionGenerateNullableAnnotations);
+    options.Writer.OrderStaticMembersFirst          = parseResult.GetValue(OptionGenerateStaticMembersFirst);
+    options.Writer.WriteNullableAnnotationDirective = parseResult.GetValue(OptionGenerateNullableAnnotations);
+
+    options.TypeDeclaration.EnableRecordTypes =
+    options.TypeDeclaration.OmitRecordImplicitInterface =
+    options.Writer.OmitCompilerGeneratedRecordEqualityMethods = parseResult.GetValue(OptionGenerateRecords);
 
     options.AttributeDeclaration.TypeFilter     = AttributeFilter.Default;
 
@@ -168,17 +173,13 @@ public sealed class RootCommandImplementation : ICommandHandler {
   }
 
   private static DirectoryInfo GetOutputDirectory(ParseResult parseResult)
-    => parseResult.GetValueForOption(OptionOutputDirectory) ?? new(Environment.CurrentDirectory);
+    => parseResult.GetValue(OptionOutputDirectory) ?? new(Environment.CurrentDirectory);
 
-  Task<int> ICommandHandler.InvokeAsync(InvocationContext invocationContext)
-#pragma warning disable CA1849
-    => Task.FromResult((this as ICommandHandler).Invoke(invocationContext));
-#pragma warning restore CA1849
+  private Task<int> RunAsync(ParseResult parseResult, CancellationToken cancellationToken)
+    => Task.FromResult(Run(parseResult, cancellationToken));
 
-  int ICommandHandler.Invoke(InvocationContext invocationContext)
+  private int Run(ParseResult parseResult, CancellationToken cancellationToken)
   {
-    var parseResult = invocationContext.ParseResult;
-
 #pragma warning disable CA2254
     logger?.LogDebug(parseResult.ToString());
 #pragma warning restore CA2254
@@ -194,8 +195,8 @@ public sealed class RootCommandImplementation : ICommandHandler {
 
     var options = GetApiListWriterOptions(parseResult);
     var outputDirectory = GetOutputDirectory(parseResult);
-    var loadAssemblyIntoReflectionOnlyContext = parseResult.GetValueForOption(OptionLoadAssemblyIntoReflectionOnlyContext);
-    var enableNullabilityAnnotations = parseResult.GetValueForOption(OptionGenerateNullableAnnotations);
+    var loadAssemblyIntoReflectionOnlyContext = parseResult.GetValue(OptionLoadAssemblyIntoReflectionOnlyContext);
+    var enableNullabilityAnnotations = parseResult.GetValue(OptionGenerateNullableAnnotations);
     var hasError = false;
 
     foreach (var inputAssemblyFile in GetInputAssemblyFiles(parseResult)) {
@@ -212,7 +213,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
         logger: logger,
         context: out var context,
         loadIntoReflectionOnlyContext: loadAssemblyIntoReflectionOnlyContext,
-        actionWithLoadedAssembly: static (assm, arg) => {
+        actionWithLoadedAssembly: static (assembly, arg) => {
           try {
 #if SYSTEM_REFLECTION_NULLABILITYINFOCONTEXT
             var nullabilityInfoContext = arg.enableNullabilityAnnotations
@@ -223,7 +224,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
             arg.options.TypeDeclaration.NullabilityInfoContext = nullabilityInfoContext;
             arg.options.MemberDeclaration.NullabilityInfoContext = nullabilityInfoContext;
 #endif
-            var outputFilePath = GetOutputFilePathOf(assm, arg.outputDirectory);
+            var outputFilePath = GetOutputFilePathOf(assembly, arg.outputDirectory);
 
             // ensure the output directory existing
             arg.outputDirectory.Create();
@@ -232,7 +233,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
 
             var writer = new ApiListWriter(
               outputWriter,
-              assm,
+              assembly,
               arg.options,
               arg.logger
             );
@@ -243,13 +244,13 @@ public sealed class RootCommandImplementation : ICommandHandler {
               writer.WriteFooter();
             }
             catch (AssemblyFileNotFoundException ex) {
-              arg.logger?.LogCritical(ex, "Could not load depending assembly '{FileName}', referenced from the assembly '{AssemblyName}'", ex.FileName, assm.GetName());
+              arg.logger?.LogCritical(ex, "Could not load depending assembly '{FileName}', referenced from the assembly '{AssemblyName}'", ex.FileName, assembly.GetName());
               arg.logger?.LogError("If you are trying to load an assembly with an SDK version that is not currently installed, install that version of the SDK, or specify the 'DOTNET_ROLL_FORWARD' environment variable and try again.");
               return null;
             }
 
             arg.logger?.LogDebug("generated API list {OutputFilePath}", outputFilePath);
-            arg.logger?.LogInformation("{AssemblyFilePath} -> {OutputFilePath}", assm.Location, outputFilePath);
+            arg.logger?.LogInformation("{AssemblyFilePath} -> {OutputFilePath}", assembly.Location, outputFilePath);
 
             return outputFilePath;
           }
@@ -291,7 +292,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
         arg: outputDirectory,
         logger: logger,
         context: out var context,
-        actionWithLoadedAssembly: static (assm, outdir) => GetOutputFilePathOf(assm, outdir)
+        actionWithLoadedAssembly: static (assembly, outdir) => GetOutputFilePathOf(assembly, outdir)
       )!;
 
       // wait for the context to be collected
@@ -305,7 +306,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
     }
   }
 
-  private static string GetOutputFilePathOf(Assembly assm, DirectoryInfo outputDirectory)
+  private static string GetOutputFilePathOf(Assembly assembly, DirectoryInfo outputDirectory)
   {
 #pragma warning restore SA1114
 #if SYSTEM_IO_PATH_JOIN
@@ -314,7 +315,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
     return Path.Combine(
 #endif
 #pragma warning disable SA1114
-      outputDirectory.FullName, $"{GetOutputFileName(assm)}.apilist.cs"
+      outputDirectory.FullName, $"{GetOutputFileName(assembly)}.apilist.cs"
     );
 
     static string GetOutputFileName(Assembly a)
@@ -373,7 +374,7 @@ public sealed class RootCommandImplementation : ICommandHandler {
 
   private IEnumerable<FileInfo> GetInputAssemblyFiles(ParseResult parseResult)
   {
-    var input = parseResult.GetValueForArgument(ArgumentInput);
+    var input = parseResult.GetRequiredValue(ArgumentInput);
     FileInfo inputFile;
 
     if (input is null)
@@ -420,10 +421,10 @@ public sealed class RootCommandImplementation : ICommandHandler {
       inputAssemblyFiles = ProjectBuilder.Build(
         inputFile,
         options: new() {
-          Configuration = parseResult.GetValueForOption(OptionConfiguration),
-          TargetFramework = parseResult.GetValueForOption(OptionTargetFramework),
-          // OS: parseResult.GetValueForOption(OptionOS),
-          RuntimeIdentifier = parseResult.GetValueForOption(OptionRuntimeIdentifier),
+          Configuration = parseResult.GetValue(OptionConfiguration),
+          TargetFramework = parseResult.GetValue(OptionTargetFramework),
+          // OS: parseResult.GetValue(OptionOS),
+          RuntimeIdentifier = parseResult.GetValue(OptionRuntimeIdentifier),
           LoggerVerbosity = VerbosityOption.ParseLoggerVerbosity(parseResult),
         },
         logger: logger
diff --git a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/VerbosityOption.cs b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/VerbosityOption.cs
index b406306..ecb9ce6 100644
--- a/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/VerbosityOption.cs
+++ b/src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/VerbosityOption.cs
@@ -2,7 +2,6 @@
 // SPDX-License-Identifier: MIT
 using System;
 using System.CommandLine;
-using System.CommandLine.Parsing;
 
 #if FEATURE_BUILD_PROJ
 using Microsoft.Build.Framework;
@@ -12,11 +11,12 @@ using Microsoft.Extensions.Logging;
 namespace Smdn.Reflection.ReverseGenerating.ListApi;
 
 public static class VerbosityOption {
-  internal static readonly Option<string> Option = new(
-    aliases: new[] { "-v", "--verbosity" },
-    description: "Verbosity of output. The value must be one of q[uiet], m[inimal], n[ormal], d[etailed], or diag[nostic].",
-    getDefaultValue: static () => "minimal"
-  );
+  // cSpell:disable
+  internal static readonly Option<string> Option = new("--verbosity", "-v") {
+    Description = "Verbosity of output. The value must be one of q[uiet], m[inimal], n[ormal], d[etailed], or diag[nostic].",
+    DefaultValueFactory = static _ => "minimal",
+  };
+  // cSpell:enable
 
   public static LogLevel ParseLogLevel(string[] args)
   {
@@ -28,7 +28,7 @@ public static class VerbosityOption {
   }
 
   public static LogLevel ParseLogLevel(ParseResult parseResult)
-    => (parseResult ?? throw new ArgumentNullException(nameof(parseResult))).GetValueForOption(Option) switch {
+    => (parseResult ?? throw new ArgumentNullException(nameof(parseResult))).GetValue(Option) switch {
 #pragma warning disable IDE0055
       "q" or "quiet"          => LogLevel.Information,
       "m" or "minimal"        => LogLevel.Information,
@@ -50,7 +50,7 @@ public static class VerbosityOption {
   }
 
   public static LoggerVerbosity ParseLoggerVerbosity(ParseResult parseResult)
-    => (parseResult ?? throw new ArgumentNullException(nameof(parseResult))).GetValueForOption(Option) switch {
+    => (parseResult ?? throw new ArgumentNullException(nameof(parseResult))).GetValue(Option) switch {
 #pragma warning disable IDE0055
       "q" or "quiet"          => LoggerVerbosity.Quiet,
       "m" or "minimal"        => LoggerVerbosity.Minimal,Notes
Full Changelog: releases/Smdn.Reflection.ReverseGenerating.ListApi-1.3.0...releases/Smdn.Reflection.ReverseGenerating.ListApi-1.4.0