dotnet-add-reference - Man Page

Adds project-to-project (P2P) references.

dotnet add reference

This article applies to: āœ“ .NET Core 1.x SDK and later versions

Synopsis

dotnet add [<PROJECT>] reference [-f|--framework] <PROJECT_REFERENCES> [-h|--help] [--interactive]

Description

The dotnet add reference command provides a convenient option to add project references to a project. After running the command, the <ProjectReference> elements are added to the project file.

<ItemGroup>
  <ProjectReference Include="app.csproj" />
  <ProjectReference Include="..\lib2\lib2.csproj" />
  <ProjectReference Include="..\lib1\lib1.csproj" />
</ItemGroup>

Arguments

  • PROJECT

    Specifies the project file. If not specified, the command searches the current directory for one.

  • PROJECT_REFERENCES

    Project-to-project (P2P) references to add. Specify one or more projects. Glob patterns are supported on Unix/Linux-based systems.

Options

Examples

Info

.NET Core