Skip to content
Latchkey

MSBuild "MSB3202: The project file ... was not found" in CI

A solution or a ProjectReference points at a .csproj that does not exist on the runner. Unlike MSB1009 (the path you passed), MSB3202 is a project the build was told to include but cannot find.

What this error means

Build fails with MSB3202 naming a project file the solution or another project references. It is deterministic and usually means a referenced project was moved, renamed, or not checked out.

MSBuild output
error MSB3202: The project file "../Shared/Shared.csproj" was not found.

Common causes

Solution references a missing project

A .sln lists a project path that no longer exists (moved/renamed) or that lives outside the checked-out tree.

ProjectReference path is wrong

A <ProjectReference Include="..." /> points at a relative path that does not resolve on the runner, often after a directory restructure.

How to fix it

Fix the reference path

Update the solution or ProjectReference to the project’s real location.

.csproj
<ProjectReference Include="..\Shared\Shared.csproj" />

Ensure the project is checked out

  1. Confirm the referenced project is committed and inside the cloned tree.
  2. Watch for sparse/partial checkouts that exclude a referenced directory.
  3. If the project was removed, drop the stale reference from the solution.

How to prevent it

  • Keep solution and ProjectReference paths in sync after moves/renames.
  • Avoid references to projects outside the repository’s checkout.
  • Build the full solution locally after restructuring to catch broken references.

Frequently asked questions

What causes ""MSB3202: ... project file ... was not found""?
A .sln lists a project path that no longer exists (moved/renamed) or that lives outside the checked-out tree.
How do I fix "MSB3202: ... project file ... was not found"?
Update the solution or ProjectReference to the project’s real location.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card