dotnet add reference

dotnet add reference --help

eg@debian:~$ dotnet add reference --help
Description:
  Add a project-to-project reference to the project.

Usage:
  dotnet add [<PROJECT>] reference <PROJECT_PATH>... [options]

Arguments:
  <PROJECT>       The project file to operate on. If a file is not specified, the command will search the current directory for one. [default: /home/eg/]
  <PROJECT_PATH>  The paths to the projects to add as references.

Options:
  -f, --framework <FRAMEWORK>  Add the reference only when targeting a specific framework.
  --interactive                Allows the command to stop and wait for user input or action (for example to complete authentication).
  -?, -h, --help               Show command line help.

dotnet add <target_project_file_path> reference <reference_project_file_path>

eg@debian:~$ dotnet add ./Data/DotnetCliExamples/ExampleSolution/ExampleSolution.WebApi1/ExampleSolution.WebApi1.csproj reference ./Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ClassLibrary1/ExampleSolution.ClassLibrary1.csproj 
Reference `..\ExampleSolution.ClassLibrary1\ExampleSolution.ClassLibrary1.csproj` added to the project.

Last updated