dotnet-add-reference
project-to-project reference adder
TLDR
SYNOPSIS
dotnet add [project] reference projectpath... [options_]
DESCRIPTION
dotnet add reference adds project-to-project (P2P) references to a project file, creating build-time dependencies between projects in a solution. Referenced projects are automatically built before the referencing project, ensuring correct build order.
P2P references enable code sharing within a solution while maintaining clear dependency boundaries. The command modifies the `.csproj` (or `.fsproj`, `.vbproj`) file to add `<ProjectReference>` elements with relative paths to the referenced projects.
PARAMETERS
-f, --framework framework
Add reference only for specific target framework.--interactive
Allow the command to prompt for input.
CAVEATS
Circular references are not allowed and will produce an error. The referenced project must exist. Use `dotnet list reference` to verify existing references.
SEE ALSO
dotnet(1), dotnet-build(1), dotnet-add-package(1)

