dotnet-installer/Documentation/manpages/sdk/dotnet-add-reference.1

63 lines
1.7 KiB
Groff
Raw Normal View History

2018-03-30 15:45:24 +00:00
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet\-add reference command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet\-add reference
.PP
.SH NAME
.PP
\f[C]dotnet\ add\ reference\f[] \- Adds project\-to\-project (P2P) references.
.SH SYNOPSIS
.PP
\f[C]dotnet\ add\ [<PROJECT>]\ reference\ [\-f|\-\-framework]\ <PROJECT_REFERENCES>\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ add\ reference\f[] command provides a convenient option to add project references to a project.
After running the command, the \f[C]<ProjectReference>\f[] elements are added to the project file.
.IP
.nf
\f[C]
<ItemGroup>
\ \ <ProjectReference\ Include="app.csproj"\ />
\ \ <ProjectReference\ Include="..\\lib2\\lib2.csproj"\ />
\ \ <ProjectReference\ Include="..\\lib1\\lib1.csproj"\ />
</ItemGroup>
\f[]
.fi
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
Specifies the project file.
If not specified, the command searches the current directory for one.
.PP
\f[C]PROJECT_REFERENCES\f[]
.PP
Project\-to\-project (P2P) references to add.
Specify one or more projects.
Glob patterns are supported on Unix/Linux\-based systems.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Adds project references only when targeting a specific framework.
.SH EXAMPLES
.PP
Add a project reference:
.PP
\f[C]dotnet\ add\ app/app.csproj\ reference\ lib/lib.csproj\f[]
.PP
Add multiple project references to the project in the current directory:
.PP
\f[C]dotnet\ add\ reference\ lib1/lib1.csproj\ lib2/lib2.csproj\f[]
.PP
Add multiple project references using a globbing pattern on Linux/Unix:
.PP
\f[C]dotnet\ add\ app/app.csproj\ reference\ **/*.csproj\f[]
.SH AUTHORS
mairaw.