{"record":{"id":"ef2da779599dcea0","repo":"microsoft/aspire","slug":"integration-package-probe-manifest-path-is-invalid","errorCode":null,"errorMessage":"Integration package probe manifest path is invalid.","messagePattern":"Integration package probe manifest path is invalid\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Shared/IntegrationPackageProbeManifest.cs","lineNumber":362,"sourceCode":"        }\n\n        return normalizedPath;\n    }\n\n    private static string NormalizeManifestPath(string manifestPath)\n    {\n        return NormalizePath(manifestPath, \"Integration package probe manifest path is invalid.\");\n    }\n\n    private static string NormalizePath(string path, string invalidPathMessage)\n    {\n        try\n        {\n            return Path.GetFullPath(path);\n        }\n        catch (Exception ex) when (ex is ArgumentException or NotSupportedException or PathTooLongException)\n        {\n            throw new InvalidOperationException(invalidPathMessage, ex);\n        }\n    }\n\n    private static string? NormalizeCulture(string? culture)\n    {\n        return string.IsNullOrWhiteSpace(culture) || string.Equals(culture, \"neutral\", StringComparison.OrdinalIgnoreCase)\n            ? null\n            : culture.Trim();\n    }\n\n    private static string NormalizeRequiredValue(string? value, string propertyName)\n    {\n        if (string.IsNullOrWhiteSpace(value))\n        {\n            throw new InvalidOperationException($\"Integration package probe manifest entry is missing required property '{propertyName}'.\");\n        }\n\n        return value.Trim();","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Shared/IntegrationPackageProbeManifest.cs#L344-L380","documentation":"NormalizePath wraps Path.GetFullPath for probe-manifest path values and converts argument-level failures (ArgumentException, NotSupportedException, PathTooLongException) into an InvalidOperationException carrying the configured 'invalid path' message. It indicates the path string itself is malformed, not that a file is missing.","triggerScenarios":"Any manifest path (the manifest file path itself via NormalizeManifestPath, or an entry path) that Path.GetFullPath rejects: null/empty after trimming, illegal characters, or paths exceeding length limits.","commonSituations":"Empty path property in a manifest JSON that slipped past other checks; path containing invalid Windows characters (quotes, colons); extremely long paths on Windows without long-path support; paths built by concatenating null segments.","solutions":["Inspect the raw path value in the manifest and remove invalid characters or empty segments.","Use Path.Combine with valid segments instead of string concatenation to build the path.","On Windows, enable long paths (LongPathsEnabled registry and longPathAware) if the path exceeds 260 characters.","Check the inner exception (ArgumentException) for the exact character or position that is invalid."],"exampleFix":"// before\nvar path = manifestDir + null + \"lib.so\"; // malformed\n\n// after\nvar path = Path.Combine(manifestDir, \"native\", \"lib.so\");","handlingStrategy":"validation","validationCode":"if (string.IsNullOrWhiteSpace(candidate) || candidate.IndexOfAny(Path.GetInvalidPathChars()) >= 0)\n    throw new ArgumentException($\"Invalid path: {candidate}\");","typeGuard":null,"tryCatchPattern":"try { Path.GetFullPath(raw); }\ncatch (Exception ex) when (ex is ArgumentException or PathTooLongException or NotSupportedException)\n{ logger.LogError(ex, \"Cannot normalize probe manifest path: {Raw}\", raw); throw; }","preventionTips":["Build paths with Path.Combine, never string concatenation with possibly-null segments.","Keep path values in the manifest as plain relative strings; avoid embedding invalid characters.","On Windows enable long-path support if deep directory trees are expected."],"tags":["path","invalid-argument","manifest"],"backgroundTag":"invalid-argument-format","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-22T11:17:16.035Z"}