stride3d/stride · error · SolutionFileException
Cannot detect dependencies of projet
Error message
Cannot detect dependencies of projet '{Name}' because the project file cannot be found.
Project full path: '{FullPath}' What it means
Project.DetectMissingDependencies for Visual C++ projects (TypeGuid == KnownProjectTypeGuid.VisualC) parses the .vcxproj file on disk with XmlDocument to find ProjectReference entries. If FullPath does not exist the analysis cannot proceed, so the library throws SolutionFileException naming the project and path.
Solutions
- Restore the missing project file at the FullPath shown in the exception (git checkout / re-clone)
- Fix the project entry path in the .sln so FullPath points at the actual file
- Exclude or remove the dangling VC++ project from the solution before analysis
- Catch SolutionFileException and skip dependency detection for that project
Example fix
// before git checkout main; // project file missing deps = project.DetectDependencies(); // after git checkout main && git submodule update --init --recursive if (File.Exists(project.FullPath)) deps = project.DetectDependencies();
Defensive patterns
Strategy: validation
Validate before calling
if (project.TypeGuid == KnownProjectTypeGuid.VisualC && !File.Exists(project.FullPath))
skip.Add(project); // exclude from dependency detection Type guard
bool HasProjectFile(Project p) => File.Exists(p.FullPath);
Try / catch
try { deps = project.DetectDependencies(); }
catch (SolutionFileException e) { logger.Warn($"{project.Name}: {e.Message}"); } Prevention
- Run solution analysis on complete checkouts (submodules included)
- Validate all project FullPaths exist before scanning the solution
- Keep .sln relative paths in sync with the on-disk layout
When it happens
Trigger: Calling solution/Project dependency detection when a VC++ project entry in the .sln points to a FullPath that is missing on disk (deleted/moved project, bad relative path, case/slash issues on the checked-out tree).
Common situations: Cloning only part of a repo; a solution referencing projects outside the repo that were never fetched; running solution analysis on a machine with partial checkouts or after a directory reorganization.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Package file [ ] was not found
- Ambiguous project name
- Missing external reference metadata for
- Could not find a MSBuild installation (expected 16.0 or…
- Could not find a supported MSBuild toolset version…
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/a98a01064f5e97fd.
Report an issue: GitHub.
Appendix: source
Thrown at sources/core/Stride.Core.Design/Solutions/Project.cs:156
{
foreach (var propertyLine in Sections["ProjectDependencies"].Properties)
{
var dependencyGuid = propertyLine.Name;
yield return FindProjectInContainer(
solution,
dependencyGuid,
"Cannot find one of the dependency of project '{0}'.\nProject guid: {1}\nDependency guid: {2}\nReference found in: ProjectDependencies section of the solution file",
Name,
Guid,
dependencyGuid);
}
}
if (TypeGuid == KnownProjectTypeGuid.VisualC)
{
if (!File.Exists(FullPath))
{
throw new SolutionFileException($"Cannot detect dependencies of projet '{Name}' because the project file cannot be found.\nProject full path: '{FullPath}'");
}
var docVisualC = new XmlDocument();
docVisualC.Load(FullPath);
foreach (XmlNode xmlNode in docVisualC.SelectNodes(@"//ProjectReference"))
{
var dependencyGuid = xmlNode.Attributes["ReferencedProjectIdentifier"].Value; // TODO handle null
XmlNode relativePathToProjectNode = xmlNode.Attributes["RelativePathToProject"];
var dependencyRelativePathToProject = relativePathToProjectNode != null ? relativePathToProjectNode.Value : "???";
yield return FindProjectInContainer(
solution,
dependencyGuid,
"Cannot find one of the dependency of project '{0}'.\nProject guid: {1}\nDependency guid: {2}\nDependency relative path: '{3}'\nReference found in: ProjectReference node of file '{4}'",
Name,
Guid,
dependencyGuid,
dependencyRelativePathToProject,View on GitHub (pinned to 96fad776d2)