{"record":{"id":"a4f5417cad549a95","repo":"stride3d/stride","slug":"missing-external-reference-metadata-for-request-project-name","errorCode":null,"errorMessage":"Missing external reference metadata for {_request.Project.Name}","messagePattern":"Missing external reference metadata for (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/assets/Stride.Core.Assets/PackageSession.Dependencies.cs","lineNumber":649,"sourceCode":"                updatedExternalProjects.AddRange(_request.ExternalProjects\n                    .Where(project =>\n                        !project.UniqueName.Equals(rootProject.UniqueName, StringComparison.Ordinal)));\n\n                var updatedReference = new ExternalProjectReference(\n                    rootProject.UniqueName,\n                    _request.Project,\n                    rootProject.MSBuildProjectPath,\n                    rootProject.ExternalProjectReferences);\n\n                updatedExternalProjects.Add(updatedReference);\n            }\n        }\n        else\n        {\n            // External references were passed, but the top level project wasn't found.\n            // This is always due to an internal issue and typically caused by errors\n            // building the project closure.\n            throw new InvalidOperationException($\"Missing external reference metadata for {_request.Project.Name}\");\n        }\n\n        return updatedExternalProjects;\n    }\n}\n","sourceCodeStart":631,"sourceCodeEnd":655,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/assets/Stride.Core.Assets/PackageSession.Dependencies.cs#L631-L655","documentation":"GetProjectReferences threw this when external references were provided as input, but the top-level project could not be located in the computed project closure, so no external-reference metadata can be attached. The source comment states this is always an internal issue, typically caused by errors building the project closure.","triggerScenarios":"Calling the reference-resolution request for a project while the MSBuild/project closure was built with errors, so the top-level project record is missing from the internal list even though external references were supplied.","commonSituations":"MSBuild workload registration failures, corrupted solution/project files, previous build errors during closure construction, engine/editor internal bugs.","solutions":["File a bug / investigate the earlier project-closure build errors in the logs","Fix or reload the solution and retry the reference resolution","Ensure the project builds cleanly (msbuild/dotnet build) before requesting references"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify the project closure built cleanly before requesting external references\nif (!closureBuildSucceeded) throw new InvalidOperationException(\"Project closure failed to build; references unavailable\");","typeGuard":null,"tryCatchPattern":"try { GetProjectReferences(request); }\ncatch (InvalidOperationException ex) when (ex.Message.StartsWith(\"Missing external reference metadata\"))\n{ logger.Error(ex, \"Internal closure failure — check earlier MSBuild errors\"); }","preventionTips":["Ensure projects build without errors before reference resolution","Keep MSBuild/tooling versions consistent","Report persistent occurrences as a library bug"],"tags":["invariant","projects","msbuild"],"backgroundTag":"internal-invariant-violation","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}