Skip to content

Commit 6edb392

Browse files
committed
Embedded -> AppRelative
1 parent 77a1ff4 commit 6edb392

File tree

1 file changed

+17
-30
lines changed

1 file changed

+17
-30
lines changed

proposed/apphost-embed-install-location.md

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ location is:
5353
Every `apphost` already has a placeholder that gets rewritten to contain the app
5454
binary path during build (that is, `dotnet build`). This proposal adds another
5555
placeholder which would represent the optional configuration of search locations
56-
and embedded relative path to an install location. Same as existing placeholder,
57-
it would conditionally be rewritten based on the app's settings. For this case,
58-
it would [only be done on `publilsh`](#writing-options-on-publish) currently.
56+
and app-relative path to an install location. Same as existing placeholder, it
57+
would conditionally be rewritten based on the app's settings. This rewrite would
58+
[only be done on `publish`](#writing-options-on-publish) of the app currently.
5959
This is similar to the proposal in [dotnet/runtime#64430](https://github.com/dotnet/runtime/issues/64430),
6060
but with additional configuration of which search locations to use.
6161

@@ -67,48 +67,35 @@ are deployed - for example, [dotnet/runtime#86801](https://github.com/dotnet/run
6767
We can allow selection of which search locations the `apphost` will use. When
6868
search locations are configured, only the specified locations will be searched.
6969

70-
```c
71-
enum search_location
72-
{
73-
sl_default = 0,
74-
sl_app_local = 1 << 0,
75-
sl_embedded = 1 << 1,
76-
sl_environment_variables = 1 << 2,
77-
sl_global = 1 << 3,
78-
};
79-
```
80-
81-
The behaviour corresponding to the `default` value is defined by the `apphost`.
82-
It is currently `app_local | environment_variables | global`.
83-
8470
The search location could be specified via a property in the project:
8571

8672
```xml
8773
<AppHostDotNetSearch>Global</AppHostDotNetSearch>
8874
```
8975

90-
where the valid values are `AppLocal`, `Embedded`, `EnvironmentVariables`, or
76+
where the valid values are `AppLocal`, `AppRelative`, `EnvironmentVariables`, or
9177
`Global`. Multiple values can be specified, delimited by semi-colons.
9278

9379
When a value is specified, only those locations will be used. For example, if
9480
`Global` is specified, `apphost` will only look at global install locations, not
95-
app-local, at any embedded path, or at environment variables.
81+
app-local, at any app-relative path, or at environment variables.
9682

97-
### Embedded relative path to install location
83+
### App-relative path to install location
9884

99-
When a relative path is embedded and the `apphost` is [configured to look at it](#configuration-of-search-locations),
100-
that path will be used as the .NET install root when running the application.
85+
When a relative path is written into an `apphost` which is [configured to look
86+
at it](#configuration-of-search-locations), that path will be used as the .NET
87+
install root when running the application.
10188

10289
The install location could be specified via a property in the project:
10390

10491
```xml
105-
<AppHostDotNetRoot>./path/to/runtime</AppHostDotNetRoot>,
92+
<AppHostRelativeDotNet>./relative/path/to/runtime</AppHostRelativeDotNet>,
10693
```
10794

108-
Setting this implies `AppHostDotNetSearch=Embedded`. If `AppHostDotNetSearch` is
109-
explicitly set to a value that does not include `Embedded`, `AppHostDotNetRoot`
110-
is meaningless - the SDK will not write the relative path into the `apphost`
111-
and the `apphost` will not check for an embedded relative path.
95+
Setting this implies `AppHostDotNetSearch=AppRelative`. If `AppHostDotNetSearch`
96+
is explicitly set to a value that does not include `AppRelative`, then setting
97+
`AppHostRelativeDotNet` is meaningless - the SDK will not write the relative
98+
path into the `apphost` and the `apphost` will not check for a relative path.
11299

113100
## Updated behaviour
114101

@@ -117,8 +104,8 @@ install location would be:
117104

118105
1. App-local, if search location not configured
119106
- Look for the runtime in the app's folder (self-contained apps)
120-
2. Embedded, if specified as a search location
121-
- Use the path embedded into `apphost`, relative to the app location
107+
2. App-relative, if specified as a search location
108+
- Use the path written into `apphost`, relative to the app location
122109
3. Environment variables, if search location not configured or if set as a
123110
search location
124111
- Read the `DOTNET_ROOT_<arch>` and `DOTNET_ROOT` environment variables
@@ -130,7 +117,7 @@ install location would be:
130117
search location
131118
- Fall back to a well-known default install location based on the platform
132119

133-
Be default - that is, without any embedded install location options - the
120+
Be default - that is, without any configured install location options - the
134121
effective behaviour remains as in the [current state](#state-in-net-8).
135122

136123
## Considerations

0 commit comments

Comments
 (0)