Home

ProjectReferences

ProjectReferences are declarations within a software project that point to other projects, signaling that the referenced projects must be built first and whose outputs are consumed by the referencing project. In Microsoft .NET and MSBuild-based projects, a project reference is expressed as a ProjectReference item in the project file (for example, Include="..\\Library\\Library.csproj"). When present, the build system ensures the referenced project's assembly is built and available to the referencing project, and the reference is considered part of the dependency graph.

Project references differ from package references; a PackageReference brings in a NuGet package, while a ProjectReference

Metadata on ProjectReference items can control behavior, such as ReferenceOutputAssembly (whether to reference the built assembly)

refers
to
another
project
in
the
solution.
This
enables
true
project-to-project
dependencies
and
allows
transitive
references
to
propagate.
Build
order
is
determined
by
the
reference
graph:
a
change
in
a
library
will
trigger
a
rebuild
of
dependents.
The
output
of
the
referenced
project
is
used
by
the
depending
project,
typically
through
a
compile-time
reference.
and
Private
(whether
to
copy
the
referenced
assembly
to
the
output
directory).
Circular
references
are
not
allowed;
broken
paths
or
missing
project
files
can
cause
failures.
Relative
paths
are
commonly
used
to
keep
the
solution
portable.
In
modern
SDK-style
projects,
the
ProjectReference
syntax
is
standard
and
Visual
Studio
reflects
and
manages
these
references
within
Solution
Explorer,
helping
to
visualize
and
navigate
the
dependency
graph.
Overall,
ProjectReferences
streamline
development
and
builds
in
multi-project
solutions
by
ensuring
correct
compilation
order,
reducing
manual
wiring,
and
enabling
incremental
builds.