microsoft/aspire · error · InvalidOperationException

Manifest entry ' ' does not contain enough information to…

Error message

Manifest entry '{entry.RelativePath}' does not contain enough information to compute a fingerprint.

What it means

Thrown by AppHostServerClosureSnapshots.GetProjectEntryFingerprint when a manifest entry has neither a file content hash nor enough backing information to derive a fingerprint. Fingerprinting is how the snapshot detects changes; an entry lacking a FileContentHash would be indistinguishable from others, so the code fails instead of emitting a colliding fingerprint.

Solutions

  1. Regenerate the manifest with a version that computes FileContentHash for every entry
  2. Ensure entries backed by real files go through the file-hash path before fingerprinting
  3. Inspect the manifest JSON for entries missing the hash field and fix their producer
  4. Add the content hash manually if constructing entries in code

Example fix

// before
var entry = new ManifestEntry { RelativePath = "libs/foo.js" };
// after
var entry = new ManifestEntry { RelativePath = "libs/foo.js", FileContentHash = ComputeHash(path) };
Defensive patterns

Strategy: validation

Validate before calling

var bad = manifest.Entries
    .Where(e => string.IsNullOrEmpty(e.FileContentHash))
    .ToList();
if (bad.Count > 0)
    throw new InvalidOperationException($"Entries missing FileContentHash: {string.Join(", ", bad.Select(e => e.RelativePath))}");

Type guard

bool IsFingerprintable(ManifestEntry e) =>
    e.FileContentHash is { Length: > 0 };

Try / catch

try
{
    var fp = GetEntryFingerprint(entry);
}
catch (InvalidOperationException ex) when (ex.Message.Contains("fingerprint"))
{
    logger.LogError("Manifest entry {Entry} lacks hash; regenerate manifest.", entry.RelativePath);
}

Prevention

When it happens

Trigger: Calling GetProjectEntryFingerprint (via GetEntryFingerprint) on a manifest entry whose FileContentHash is null or empty and which is not package-backed.

Common situations: Hand-edited or partially written manifest files, a manifest producer version that stopped emitting FileContentHash, or entries created programmatically without hashing their content.

Related errors


AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16). Data as JSON: /api/errors/cda14ed70499be15. Report an issue: GitHub.

Appendix: source

Thrown at src/Aspire.Cli/Projects/AppHostServerClosureSnapshots.cs:248

    private static string GetEntryFingerprint(AppHostServerClosureManifestEntry entry)
    {
        if (entry.IsPackageBacked)
        {
            return $"packages/{entry.RelativePath}|{entry.AssetType ?? "runtime"}|{entry.PackageId}|{entry.PackageVersion}|{entry.PathInPackage}|{entry.PackageSha512}|{entry.SourcePath}";
        }

        return GetProjectEntryFingerprint(entry);
    }

    private static string GetProjectEntryFingerprint(AppHostServerClosureManifestEntry entry)
    {
        if (entry.FileContentHash is { Length: > 0 } fileContentHash)
        {
            return $"libs/{entry.RelativePath}|file|{fileContentHash}";
        }

        throw new InvalidOperationException($"Manifest entry '{entry.RelativePath}' does not contain enough information to compute a fingerprint.");
    }

    private static string ComputeTextHash(string value)
    {
        var hash = new XxHash3();
        hash.Append(Encoding.UTF8.GetBytes(value));
        return Convert.ToHexString(hash.GetCurrentHash()).ToLowerInvariant();
    }

    internal static string ComputeFileHash(string path, CancellationToken cancellationToken)
    {
        var hash = new XxHash3();
        using var stream = File.OpenRead(path);
        var buffer = new byte[81920];
        int bytesRead;
        while ((bytesRead = stream.Read(buffer)) > 0)
        {
            cancellationToken.ThrowIfCancellationRequested();

View on GitHub (pinned to 25830f84bd)