Skip to content

Commit 248dc83

Browse files
baronfeltmds
andauthored
Add notes about dnx (#47094)
* Add notes about `dnx` Add a brief snippet about the new `dnx` script. * Update distribution-packaging.md * Add symlink and description * Update docs/core/distribution-packaging.md Co-authored-by: Tom Deseyn <[email protected]> --------- Co-authored-by: Tom Deseyn <[email protected]>
1 parent 6b10058 commit 248dc83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/core/distribution-packaging.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ When installed, .NET consists of several components that are laid out as follows
1818
```
1919
{dotnet_root} (0) (*)
2020
├── dotnet (1)
21+
├── dnx (22)
2122
├── LICENSE.txt (8)
2223
├── ThirdPartyNotices.txt (8)
2324
├── host (*)
@@ -69,12 +70,15 @@ When installed, .NET consists of several components that are laid out as follows
6970
│ └── dotnet.1.gz (9)
7071
└── usr/bin
7172
└── dotnet (10)
73+
└── dnx (23)
7274
```
7375

7476
- (0) **{dotnet_root}** is a shared root for all .NET major and minor versions. If multiple runtimes are installed, they share the **{dotnet_root}** folder, for example, `{dotnet_root}/shared/Microsoft.NETCore.App/6.0.11` and `{dotnet_root}/shared/Microsoft.NETCore.App/7.0.0`. The name of the `{dotnet_root}` folder should be version agnostic, that is, simply `dotnet`.
7577

7678
- (1) **dotnet** The host (also known as the "muxer") has two distinct roles: activate a runtime to launch an application, and activate an SDK to dispatch commands to it. The host is a native executable (`dotnet.exe`).
7779

80+
- (22) **dnx** The `dnx` script is an executable shell script whose purpose is to foward along user commands to the `dotnet dnx` command inside an SDK. This functionality primarily exists to make acquiring and launching various kinds of .NET applications, like .NET Tools, easier for end-users. Think of it similarly to the `npx` command from Node. It is version-independent since most of the actual functionality of the `dnx` one-shot execution process is handled in the `dotnet` CLI implementation in the versioned SDK directory.
81+
7882
While there's a single host, most of the other components are in versioned directories (2,3,5,6). This means multiple versions can be present on the system since they're installed side by side.
7983

8084
- (2) **host/fxr/\<fxr version>** contains the framework resolution logic used by the host. The host uses the latest hostfxr that is installed. The hostfxr is responsible for selecting the appropriate runtime when executing a .NET application. For example, an application built for .NET 7.0.0 uses the 7.0.5 runtime when it's available. Similarly, hostfxr selects the appropriate SDK during development.
@@ -93,7 +97,7 @@ The **shared** folder contains frameworks. A shared framework provides a set of
9397

9498
- (8) **LICENSE.txt,ThirdPartyNotices.txt** are the .NET license and licenses of third-party libraries used in .NET, respectively.
9599

96-
- (9,10) **dotnet.1.gz, dotnet** `dotnet.1.gz` is the dotnet manual page. `dotnet` is a symlink to the dotnet host(1). These files are installed at well-known locations for system integration.
100+
- (9,10, 23) **dotnet.1.gz, dotnet** `dotnet.1.gz` is the dotnet manual page. `dotnet` is a symlink to the dotnet host(1). `dnx` is a symlink to the `dnx` shell script (22). These files are installed at well-known locations for system integration.
97101

98102
- (11,12) **Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref** describe the API of an `x.y` version of .NET and ASP.NET Core respectively. These packs are used when compiling for those target versions.
99103

@@ -171,7 +175,7 @@ The following lists the recommended packages:
171175
- `dotnet-host` - dependency
172176
- **Version:** \<runtime version>
173177
- **Example:** dotnet-host
174-
- **Contains:** (1),(8),(9),(10),(16)
178+
- **Contains:** (1),(8),(9),(10),(16),(22),(23)
175179

176180
- `dotnet-apphost-pack-[major].[minor]` - dependency
177181
- **Version:** \<runtime version>

0 commit comments

Comments
 (0)