This article applies to: âï¸ .NET Core 3.1 SDK and later versions
Namedotnet reference remove
- Removes project-to-project (P2P) references.
Note
If you're using .NET 9 SDK or earlier, use the "verb first" form (dotnet remove reference
) instead. The "noun first" form was introduced in .NET 10. For more information, see More consistent command order.
dotnet reference remove [-f|--framework <FRAMEWORK>] [--project <PROJECT>]
<PROJECT_REFERENCES>
dotnet reference remove -h|--help
Description
The dotnet reference remove
command provides a convenient option to remove project references from a project.
PROJECT
Target project file. If not specified, the command searches the current directory for one.
PROJECT_REFERENCES
Project-to-project (P2P) references to remove. You can specify one or multiple projects. Glob patterns are supported on Unix/Linux based terminals.
Options-?|-h|--help
Prints out a description of how to use the command.
-f|--framework <FRAMEWORK>
Removes the reference only when targeting a specific framework using the TFM format.
Remove a project reference from the specified project:
dotnet reference remove lib/lib.csproj --project app/app.csproj
Remove multiple project references from the project in the current directory:
dotnet reference remove lib1/lib1.csproj lib2/lib2.csproj
Remove multiple project references using a glob pattern on Unix/Linux:
dotnet reference remove **/*.csproj` --project app/app.csproj
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. Additional resources In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4