@@ -53,9 +53,9 @@ location is:
53
53
Every ` apphost ` already has a placeholder that gets rewritten to contain the app
54
54
binary path during build (that is, ` dotnet build ` ). This proposal adds another
55
55
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.
59
59
This is similar to the proposal in [ dotnet/runtime #64430 ] ( https://github.com/dotnet/runtime/issues/64430 ) ,
60
60
but with additional configuration of which search locations to use.
61
61
@@ -67,48 +67,35 @@ are deployed - for example, [dotnet/runtime#86801](https://github.com/dotnet/run
67
67
We can allow selection of which search locations the ` apphost ` will use. When
68
68
search locations are configured, only the specified locations will be searched.
69
69
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
-
84
70
The search location could be specified via a property in the project:
85
71
86
72
``` xml
87
73
<AppHostDotNetSearch >Global</AppHostDotNetSearch >
88
74
```
89
75
90
- where the valid values are ` AppLocal ` , ` Embedded ` , ` EnvironmentVariables ` , or
76
+ where the valid values are ` AppLocal ` , ` AppRelative ` , ` EnvironmentVariables ` , or
91
77
` Global ` . Multiple values can be specified, delimited by semi-colons.
92
78
93
79
When a value is specified, only those locations will be used. For example, if
94
80
` 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.
96
82
97
- ### Embedded relative path to install location
83
+ ### App- relative path to install location
98
84
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.
101
88
102
89
The install location could be specified via a property in the project:
103
90
104
91
``` xml
105
- <AppHostDotNetRoot >./path/to/runtime</AppHostDotNetRoot >,
92
+ <AppHostRelativeDotNet >./relative/ path/to/runtime</AppHostRelativeDotNet >,
106
93
```
107
94
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.
112
99
113
100
## Updated behaviour
114
101
@@ -117,8 +104,8 @@ install location would be:
117
104
118
105
1 . App-local, if search location not configured
119
106
- 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
122
109
3 . Environment variables, if search location not configured or if set as a
123
110
search location
124
111
- Read the ` DOTNET_ROOT_<arch> ` and ` DOTNET_ROOT ` environment variables
@@ -130,7 +117,7 @@ install location would be:
130
117
search location
131
118
- Fall back to a well-known default install location based on the platform
132
119
133
- Be default - that is, without any embedded install location options - the
120
+ Be default - that is, without any configured install location options - the
134
121
effective behaviour remains as in the [ current state] ( #state-in-net-8 ) .
135
122
136
123
## Considerations
0 commit comments