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
Copy file name to clipboardExpand all lines: docs/core/deploying/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ There are also a few disadvantages:
36
36
37
37
## Self-contained deployments (SCD)
38
38
39
-
For a self-contained deployment, you deploy your app and any required third-party dependencies along with the version of .NET Core that you used to build the app. Creating an SCD doesn't include the [native dependencies of .NET Core](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md) on various platforms, so these must be present before the app runs.
39
+
For a self-contained deployment, you deploy your app and any required third-party dependencies along with the version of .NET Core that you used to build the app. Creating an SCD doesn't include the [native dependencies of .NET Core](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md) on various platforms, so these must be present before the app runs. For more information on version binding at runtime see the topic on [version binding in .NET Core](../versions/binding.md)
40
40
41
41
FDD and SCD deployments use separate host executables, so you can sign a host executable for an SCD with your publisher signature.
.NET Core provides a single entry-point for operating on projects and built applications with the `dotnet` command. You may have multiple runtime and SDK versions installed. The `dotnet` command must:
11
13
@@ -27,20 +29,19 @@ These policies perform the following roles:
27
29
There are multiple actions where version binding takes place:
28
30
29
31
- Select an [SDK](#select-an-sdk-version).
30
-
- Select a [target framework](#select-a-target-framework) for the application.
31
-
- Select a [minimum runtime version](#minimum-required-runtime-version)
32
-
- Selecting a runtime to run on
33
-
32
+
- Select a [target framework](#build-time-version-binding) for the application.
33
+
- Select a [minimum runtime version](#runtime-version-binding).
34
+
- Selecting a runtime to run on.
34
35
35
36
## Select an SDK version
36
37
37
-
Your first experience with .NET Core is typically with an SDK command, for example `dotnet new`, `dotnet build` or `dotnet run`. The `dotnet` command must use a chosen version of the SDK for these commands. .NET Core uses the latest SDK. You'll use the .NET Core 99.9 SDK when it's installed, even if you're using the SDK command for .NET Core 2.0 development.
38
+
Your first experience with .NET Core is typically with an SDK command, for example `dotnet new`, `dotnet build` or `dotnet run`. The `dotnet` command must use a chosen version of the SDK for these commands. .NET Core uses the latest SDK by default. If you've installed the .NET Core 99.9 SDK, the `dotnet` command uses .NET Core SDK 99.9 even when you're targeting .NET Core 2.0 development. Note that this is true for preview versions as well as released versions.
38
39
39
-
You take advantage of the latest SDK features and improvements while targeting earlier .NET Core versions. You can target multiple versions of .NET Core on different projects, using the same SDK tools for all projects.
40
+
You can take advantage of the latest SDK features and improvements while targeting earlier .NET Core versions. You can target multiple versions of .NET Core on different projects, using the same SDK tools for all projects.
40
41
41
42
When needed, you configure `dotnet` to use a different version of the SDK. You specify that version in a [global.json file](../tools/global-json.md). The "use latest" policy means you only use `global.json` to specify a .NET Core version earlier than the latest installed version.
42
43
43
-
`global.json`can be used at different scopes:
44
+
`global.json`can be used at different scopes:
44
45
45
46
- Per project, placed beside the project file.
46
47
- For a set of projects, placed at a common [grand-]parent for all of the projects. This location can be as high in the directory structure as the root of a drive.
@@ -55,31 +56,29 @@ The following example shows the `global.json` syntax:
55
56
}
56
57
```
57
58
58
-
You only use `global.json` to specify a version when you must lock a specific app or set of apps to an earlier SDK than the latest on the machine.
59
-
60
59
The process for selecting an SDK version is:
61
60
62
-
-`dotnet`binds to latest SDK by default.
63
-
-You can override the latest version using global.json.
64
-
-`dotnet`uses the first global.json file found, iteratively reverse-navigating the path upward from the current working directory.
61
+
-`dotnet`searches for a `global.json` file iteratively reverse-navigating the path upward from the current working directory.
62
+
-`dotnet` uses the SDK specified in the first `global.json` found.
63
+
-`dotnet`binds to the latest installed SDK if no `global.json` is found.
65
64
66
-
## Select a target SDK
65
+
## Build time version binding
67
66
68
-
You specify the target framework in the project file. Set the `TargetFramework` as shown in the following example:
67
+
You build your project against APIs defined in a **Target Framework Moniker** (TFM). You specify the target framework in the project file. Set the `TargetFramework` element in your project file as shown in the following example:
69
68
70
69
```xml
71
70
<TargetFramework>netcoreapp2.0</TargetFramework>
72
71
```
73
72
74
-
You set multiple target frameworks if you need to build different code for different environments. Setting multiple target frameworks is more common for libraries, but can be done with applications as well. You specify a `TargetFrameworks` property (plural of `TargetFramework`). The target frameworks will be semicolon-delimited as shown in the following example:
73
+
You may build your project against multiple frameworks. Setting multiple target frameworks is more common for libraries but can be done with applications as well. You specify a `TargetFrameworks` property (plural of `TargetFramework`). The target frameworks will be semicolon-delimited as shown in the following example:
A given SDK will support a fixed set of frameworks, typically capped to the target framework of the runtime(s) it includes. For example, the .NET Core 2.0 SDK includes the .NET Core 2.0 runtime, which is an implementation of the `netcoreapp2.0` target framework. The .NET Core 2.0 SDK will support `netcoreapp1.0`, `netcoreapp1.1`, and `netcoreapp2.0` but not `netcoreapp2.1` (or higher). You'll need to install the .NET Core 2.1 SDK in order to build for `netcoreapp2.1`.
79
+
A given SDK supports a fixed set of frameworks, typically capped to the target framework of the runtimes it includes. For example, the .NET Core 2.0 SDK includes the .NET Core 2.0 runtime, which is an implementation of the `netcoreapp2.0` target framework. The .NET Core 2.0 SDK will support `netcoreapp1.0`, `netcoreapp1.1`, and `netcoreapp2.0` but not `netcoreapp2.1` (or higher). Youinstall the .NET Core 2.1 SDK to build for `netcoreapp2.1`.
81
80
82
-
.NET Standard target frameworks are also capped in the same way. The .NET Core 2.0 SDK will be capped to `netstandard2.0`.
81
+
.NET Standard target frameworks are also capped in the same way. The .NET Core 2.0 SDK is capped to `netstandard2.0`.
83
82
84
83
A given SDK defines a fixed minimum runtime patch version for each target framework that it supports. The minimum runtime patch version is maintained at the `.0` version (for example, `2.0.0`) for the lifetime of a major/minor runtime version family.
85
84
@@ -89,7 +88,7 @@ You can override the minimum runtime patch version (to higher or lower versions)
When you target multiple target frameworks, you must specify the minimum runtime patch version to the specific .NET Core target framework, as shown in the following example:
91
+
When you target multiple frameworks, you must specify the minimum runtime patch version to the specific .NET Core target framework, as shown in the following example:
@@ -98,13 +97,11 @@ When you target multiple target frameworks, you must specify the minimum runtime
98
97
99
98
A given SDK supports a fixed set of target frameworks. Typically, the target frameworks are the SDK framework version and a set of earlier versions.
100
99
101
-
## Minimum required runtime version
102
-
103
-
You run an application from source with `dotnet run`. `dotnet run` both builds and runs an application.
100
+
## Runtime version binding
104
101
105
-
The built application runs on machines that satisfy the minimum required runtime patch version, stored in the `*.runtimeconfig.json` file. The highest patch version is selected. For example, the `2.0.4` runtime is selected in the case that the minimum runtime version is `2.0.0` while `2.0.0`, `2.0.1`and `2.0.4` are all installed on the machine. Higher minor or major versions (for example, `2.1.1` or `3.0.1`) won't be considered. Lower versions also won't be considered.
102
+
You run an application from source with [`dotnet run`](../tools/dotnet-run.md). `dotnet run` both builds and runs an application.
106
103
107
-
It's an error if the minimum version specified for an application is not satisfied. However, you may run an application on a machine that is missing the runtime required by the application. If a higher minor version is installed, the minor version is used instead of failing. Higher major versions will not be used to load applications. This behavior is referred to as "minor version roll-forward."
104
+
The built application runs on machines that satisfy the minimum required runtime patch version, stored in the `*.runtimeconfig.json` file. The highest patch version is selected. For example, the `2.0.4` runtime is selected in the case that the minimum runtime version is `2.0.0` while `2.0.0`, `2.0.1` and `2.0.4` are all installed on the machine. This behavior is referred to as "minor version roll-forward." Higher minor or major versions (for example, `2.1.1` or `3.0.1`) won't be considered. Lower versions also won't be considered. When no acceptable runtime is installed, the application will not run.
108
105
109
106
Consider an application requiring 2.0.4, `dotnet` would search and bind to a runtime in this order:
110
107
@@ -114,7 +111,7 @@ Consider an application requiring 2.0.4, `dotnet` would search and bind to a run
114
111
If neither is found, you see an error message similar to the following example:
115
112
116
113
> This application requires .NET Core 2.0.4. Please install .NET Core 2.0.4 or a higher compatible version.
117
-
> Please see https://aka.ms/install-dotnet-core to learn about .NET Core installation and runtime versioning.
114
+
> Please see https://www.microsoft.com/net/download to learn about .NET Core installation and runtime versioning.
118
115
119
116
A few usage examples demonstrate the behavior:
120
117
@@ -142,7 +139,7 @@ Developers should remember the following rules:
142
139
143
140
## Publish a self-contained application
144
141
145
-
You can publish an application as a **self-contained distribution**. This approach includes .NET Core. Self-contained distributions do not have a dependency on runtime environments. Runtime binding occurs at publishing time, not run-time.
142
+
You can publish an application as a [**self-contained distribution**](../deploying/#self-contained-deployments-scd). This approach includes .NET Core. Self-contained distributions do not have a dependency on runtime environments. Runtime binding occurs at publishing time, not run-time.
146
143
147
144
The publishing process will select the latest patch version of the given runtime family. For example, `dotnet publish` will select .NET Core 2.0.4 if it is the latest patch version in the .NET Core 2.0 runtime family, independent of the existence of earlier patch versions or minimum runtime patch version values. The publishing process differs from `dotnet build` runtime selection for two reasons:
0 commit comments