Skip to content

Commit 7ca336d

Browse files
committed
Move cli parameters to include
1 parent 556fd9a commit 7ca336d

File tree

4 files changed

+28
-45
lines changed

4 files changed

+28
-45
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`-c Release`
2+
3+
This switch sets the build configuration to Release, which is optimized for production deployment.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`-r <RID>` (optional)
2+
3+
This switch uses a runtime identifier (RID) to specify the target platform and ensures native dependencies are included (if required). For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../../rid-catalog.md).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`-r <RID>`
2+
3+
This switch uses a runtime identifier (RID) to specify the target platform and ensures native dependencies are included (if required). For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../../rid-catalog.md).

docs/core/deploying/index.md

Lines changed: 19 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,9 @@ To ensure that your app is published with its native dependencies:
110110
dotnet publish -c Release -r <RID>
111111
```
112112

113-
- `-c Release`
113+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
114114

115-
This switch sets the build configuration to Release, which is optimized for production deployment.
116-
117-
- `-r <RID>`
118-
119-
This switch uses a runtime identifier (RID) to specify the target platform and ensures native dependencies are included. For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../rid-catalog.md).
115+
- [!INCLUDE [cli-r-rid-native-deps](includes/cli-r-rid-native-deps.md)]
120116

121117
::: zone-end
122118

@@ -160,13 +156,9 @@ Publishing a framework-dependent deployment creates an app that automatically ro
160156
dotnet publish -c Release [-r <RID>]
161157
```
162158

163-
- `-c Release`
164-
165-
This switch sets the build configuration to Release, which is optimized for production deployment.
166-
167-
- `-r <RID>` (optional)
159+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
168160

169-
This switch uses a runtime identifier (RID) to specify the target platform. For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../rid-catalog.md).
161+
- [!INCLUDE [cli-r-rid](includes/cli-r-rid.md)]
170162

171163
Or explicitly:
172164

@@ -176,7 +168,7 @@ dotnet publish -c Release [-r <RID>] --self-contained false
176168

177169
- `--self-contained false`
178170

179-
This switch explicitly tells the .NET SDK to create a framework-dependent deployment.
171+
This switch explicitly tells the .NET SDK to create a framework-dependent deployment.
180172

181173
::: zone-end
182174

@@ -204,13 +196,11 @@ To publish as a cross-platform DLL:
204196
dotnet publish -c Release -p:UseAppHost=false
205197
```
206198

207-
- `-c Release`
208-
209-
This switch sets the build configuration to Release, which is optimized for production deployment.
199+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
210200

211201
- `-p:UseAppHost=false`
212202

213-
This property disables the creation of a platform-specific executable, producing only the portable DLL.
203+
This property disables the creation of a platform-specific executable, producing only the portable DLL.
214204

215205
::: zone-end
216206

@@ -254,17 +244,13 @@ Publishing an SCD creates an app that doesn't roll forward to the latest availab
254244
dotnet publish -c Release -r <RID> --self-contained true
255245
```
256246

257-
- `-c Release`
258-
259-
This switch sets the build configuration to Release, which is optimized for production deployment.
260-
261-
- `-r <RID>`
247+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
262248

263-
This switch uses a runtime identifier (RID) to specify the target platform. For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../rid-catalog.md).
249+
- [!INCLUDE [cli-r-rid](includes/cli-r-rid.md)]
264250

265251
- `--self-contained true`
266252

267-
This switch tells the .NET SDK to create an executable as a self-contained deployment (SCD).
253+
This switch tells the .NET SDK to create an executable as a self-contained deployment (SCD).
268254

269255
::: zone-end
270256

@@ -310,17 +296,13 @@ For more information about single-file deployment, see [Single-file deployment](
310296
dotnet publish -c Release -r <RID> -p:PublishSingleFile=true
311297
```
312298

313-
- `-c Release`
299+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
314300

315-
This switch sets the build configuration to Release, which is optimized for production deployment.
316-
317-
- `-r <RID>`
318-
319-
This switch uses a runtime identifier (RID) to specify the target platform. For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../rid-catalog.md).
301+
- [!INCLUDE [cli-r-rid](includes/cli-r-rid.md)]
320302

321303
- `-p:PublishSingleFile=true`
322304

323-
This property bundles all application-dependent files into a single binary.
305+
This property bundles all application-dependent files into a single binary.
324306

325307
::: zone-end
326308

@@ -365,17 +347,13 @@ For more information about Native AOT deployment, see [Native AOT deployment](na
365347
dotnet publish -c Release -r <RID> -p:PublishAot=true
366348
```
367349

368-
- `-c Release`
369-
370-
This switch sets the build configuration to Release, which is optimized for production deployment.
350+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
371351

372-
- `-r <RID>`
373-
374-
This switch uses a runtime identifier (RID) to specify the target platform. For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../rid-catalog.md).
352+
- [!INCLUDE [cli-r-rid](includes/cli-r-rid.md)]
375353

376354
- `-p:PublishAot=true`
377355

378-
This property enables Native AOT compilation, which compiles the app directly to native code.
356+
This property enables Native AOT compilation, which compiles the app directly to native code.
379357

380358
::: zone-end
381359

@@ -430,17 +408,13 @@ ReadyToRun binaries contain both intermediate language (IL) code and the native
430408
dotnet publish -c Release -r <RID> -p:PublishReadyToRun=true
431409
```
432410

433-
- `-c Release`
434-
435-
This switch sets the build configuration to Release, which is optimized for production deployment.
436-
437-
- `-r <RID>`
411+
- [!INCLUDE [cli-c-release](includes/cli-c-release.md)]
438412

439-
This switch uses a runtime identifier (RID) to specify the target platform. For a list of runtime identifiers, see [Runtime Identifier (RID) catalog](../rid-catalog.md).
413+
- [!INCLUDE [cli-r-rid](includes/cli-r-rid.md)]
440414

441415
- `-p:PublishReadyToRun=true`
442416

443-
This property enables ReadyToRun compilation, which improves startup performance by pre-compiling assemblies.
417+
This property enables ReadyToRun compilation, which improves startup performance by pre-compiling assemblies.
444418

445419
::: zone-end
446420

0 commit comments

Comments
 (0)