You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -140,6 +140,10 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS
140
140
141
141
Display debug information.
142
142
143
+
-**`--check-trust-machine-readable`**
144
+
145
+
Same as running `--check --trust`, but outputs the results in json.
146
+
143
147
## Examples
144
148
145
149
- Check for the presence of a development certificate, and create one in the default certificate store if one doesn't exist yet. But don't trust the certificate.
@@ -188,8 +192,8 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS
188
192
189
193
## See also
190
194
191
-
*[Generate self-signed certificates with the .NET CLI](../additional-tools/self-signed-certificates-guide.md)
192
-
*[Enforce HTTPS in ASP.NET Core](/aspnet/core/security/enforcing-ssl)
193
-
*[Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted)
194
-
*[Hosting ASP.NET Core images with Docker over HTTPS](/aspnet/core/security/docker-https)
195
-
*[Hosting ASP.NET Core images with Docker Compose over HTTPS](/aspnet/core/security/docker-compose-https)
195
+
-[Generate self-signed certificates with the .NET CLI](../additional-tools/self-signed-certificates-guide.md)
196
+
-[Enforce HTTPS in ASP.NET Core](/aspnet/core/security/enforcing-ssl)
197
+
-[Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted)
198
+
-[Hosting ASP.NET Core images with Docker over HTTPS](/aspnet/core/security/docker-https)
199
+
-[Hosting ASP.NET Core images with Docker Compose over HTTPS](/aspnet/core/security/docker-compose-https)
Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the *project.assets.json* file.
@@ -78,7 +76,7 @@ You can provide MSBuild properties to the `dotnet pack` command for the packing
78
76
79
77
Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory.
description: The dotnet package remove command provides a convenient option to remove NuGet package reference to a project.
4
-
ms.date: 04/02/2025
4
+
ms.date: 09/29/2025
5
5
---
6
6
# dotnet package remove
7
7
8
-
**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions
8
+
**This article applies to:** ✔️ .NET 6 and later versions
9
9
10
10
## Name
11
11
12
-
`dotnet package remove` - Removes package reference from a project file.
12
+
`dotnet package remove` - Removes a package reference from a project file.
13
13
14
14
> [!NOTE]
15
15
> If you're using .NET 9 SDK or earlier, use the "verb first" form (`dotnet remove package`) instead. The "noun first" form was introduced in .NET 10. For more information, see [More consistent command order](../whats-new/dotnet-10/sdk.md#more-consistent-command-order).
@@ -28,16 +28,22 @@ The `dotnet package remove` command provides a convenient option to remove a NuG
28
28
29
29
## Arguments
30
30
31
-
`PROJECT`
32
-
33
-
Specifies the project file. If not specified, the command searches the current directory for one.
34
-
35
31
`PACKAGE_NAME`
36
32
37
33
The package reference to remove.
38
34
39
35
## Options
40
36
37
+
-**`-p|--project <PROJECT>`**
38
+
39
+
The project file to operate on. If a solution file is specified, the command will update the package in all projects in the solution that reference it. If not specified, the command will search the current directory for a project file.
Sets the specified environment variable in the process that will be run by the command. The specified environment variable is *not* applied to the `dotnet run` process.
@@ -117,6 +118,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th
117
118
118
119
Doesn't build the project before running. It also implicitly sets the `--no-restore` flag.
119
120
121
+
-**`--no-cache`**
122
+
123
+
Skip up to date checks and always build the program before running.
124
+
120
125
-**`--no-dependencies`**
121
126
122
127
When restoring a project with project-to-project (P2P) references, restores the root project and not the references.
@@ -129,6 +134,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th
129
134
130
135
Doesn't execute an implicit restore when running the command.
131
136
137
+
-**`--no-self-contained`**
138
+
139
+
Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application.
140
+
132
141
[!INCLUDE [os](../../../includes/cli-os.md)]
133
142
134
143
-**`--project <PATH>`**
@@ -158,6 +167,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th
158
167
159
168
Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the [RID catalog](../rid-catalog.md).
160
169
170
+
-**`-sc|--self-contained`**
171
+
172
+
Publishes the .NET runtime with your application so the runtime doesn't need to be installed on the target system. The default is `false`. However, when targeting .NET 7 or lower, the default is `true` if a runtime identifier is specified.
The *package store manifest file* is an XML file that contains the list of packages to store. The format of the manifest file is compatible with the SDK-style project format. So, a project file that references the desired packages can be used with the `-m|--manifest` option to store assemblies in the runtime package store. To specify multiple manifest files, repeat the option and path for each file. For example: `--manifest packages1.csproj --manifest packages2.csproj`.
@@ -61,6 +63,10 @@ dotnet store -h|--help
61
63
62
64
Skips symbol generation. Currently, you can only generate symbols on Windows and Linux.
63
65
66
+
-**`--use-current-runtime, --ucr [true|false]`**
67
+
68
+
Use current runtime as the target runtime. The default is `false`.
@@ -186,6 +187,8 @@ Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework.
186
187
187
188
Enables diagnostic mode for the test platform and writes diagnostic messages to the specified file and to files next to it. The process that is logging the messages determines which files are created, such as `*.host_<date>.txt` for test host log, and `*.datacollector_<date>.txt` for data collector log.
Sets the value of an environment variable. Creates the variable if it does not exist, overrides if it does exist. Use of this option will force the tests to be run in an isolated process. The option can be specified multiple times to provide multiple variables.
0 commit comments