public static string BuildRuntimeConfigFilename([NotNull] this AssemblyDefinition assemblyDefinition, [NotNull] ISnapFilesystem snapFilesystem, OSPlatform osPlatform = default) { if (assemblyDefinition == null) { throw new ArgumentNullException(nameof(assemblyDefinition)); } if (snapFilesystem == null) { throw new ArgumentNullException(nameof(snapFilesystem)); } var filename = assemblyDefinition.BuildRelativeFilename(osPlatform); return($"{snapFilesystem.PathGetFileNameWithoutExtension(filename)}.runtimeconfig.json"); }