ElectronNET/Electron.NET · error · BuildAbortedException

Unknown release notes format.

Error message

Unknown release notes format.

What it means

The ReleaseNotesParser.Parse method tries to detect the release notes format: if it finds no line it recognizes (neither the complex section-marker format nor a '*' bullet line starting the simple format), it cannot determine how to interpret the file and throws BuildAbortedException("Unknown release notes format."). Called from OnBuildInitialized when the build loads CHANGELOG/release notes.

Solutions

  1. Reformat the release notes so entries use the simple format: lines starting with '*'.
  2. Alternatively use the complex format with recognized section/version headers.
  3. Check the top of the release notes file for stray preamble lines (titles, badges, comments) and remove or reformat them.
  4. Restore the original CHANGELOG format if it was recently converted by another tool.

Example fix

// before (CHANGELOG.md)
# Changelog
- 1.2.0: Added feature
// after
# Changelog
* 1.2.0 - Added feature
Defensive patterns

Strategy: validation

Validate before calling

var firstLine = File.ReadLines(notesPath).FirstOrDefault(l => !string.IsNullOrWhiteSpace(l));
if (firstLine is null || !(firstLine.StartsWith("*") /* or complex-format marker */))
    throw new InvalidOperationException($"{notesPath} does not match a supported release notes format.");

Try / catch

try
{
    var notes = parser.Parse(File.ReadAllLines(notesPath));
}
catch (BuildAbortedException ex) when (ex.Message == "Unknown release notes format.")
{
    Logger.Error($"Unrecognized format in {notesPath}; expected '* version' bullets or sectioned format.");
}

Prevention

When it happens

Trigger: Calling Parse (directly or via OnBuildInitialized) on a release notes file whose first meaningful line is neither a complex-format header (e.g. a version section marker) nor a line beginning with '*' — the format-detection loop falls through to the throw.

Common situations: CHANGELOG.md reformatted with '-' or numbered bullets instead of '*'; file starts with a project title or HTML comment before any version entry; empty or whitespace-only release notes file; migration from another changelog tool with a different heading style.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of ElectronNET/Electron.NET@87cc6f98b6 (2026-09-14). Data as JSON: /api/errors/8b773825b7651344. Report an issue: GitHub.

Appendix: source

Thrown at nuke/ReleaseNotesParser.cs:58

        }

        var lines = content.SplitLines();
        if (lines.Length > 0)
        {
            var line = lines[0].Trim();

            if (line.StartsWith("#", StringComparison.OrdinalIgnoreCase))
            {
                return ParseComplexFormat(lines);
            }

            if (line.StartsWith("*", StringComparison.OrdinalIgnoreCase))
            {
                return ParseSimpleFormat(lines);
            }
        }

        throw new BuildAbortedException("Unknown release notes format.");
    }

    private IReadOnlyList<ReleaseNotes> ParseComplexFormat(string[] lines)
    {
        var lineIndex = 0;
        var result = new List<ReleaseNotes>();

        while (true)
        {
            if (lineIndex >= lines.Length)
            {
                break;
            }

            // Create release notes.
            var semVer = SemVersion.Zero;
            var version = SemVersion.TryParse(lines[lineIndex], out semVer);
            if (!version)

View on GitHub (pinned to 87cc6f98b6)