Skip to content

Commit 77a1ff4

Browse files
committed
Write options on publish only
1 parent 261a89d commit 77a1ff4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

proposed/apphost-embed-install-location.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ 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
5656
and embedded relative path to an install location. Same as existing placeholder,
57-
it would conditionally be rewritten during build based on the app's settings.
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.
5859
This is similar to the proposal in [dotnet/runtime#64430](https://github.com/dotnet/runtime/issues/64430),
5960
but with additional configuration of which search locations to use.
6061

@@ -134,17 +135,16 @@ effective behaviour remains as in the [current state](#state-in-net-8).
134135

135136
## Considerations
136137

137-
### Writing embedded options on build
138-
139-
This proposal writes the install location options in the `apphost` on `build`.
140-
Without SDK support for constructing the layout, this means that if a developer
141-
specifies an embedded relative install location path, it is up to them to create
142-
a layout with the runtime in the expected location relative to the app output as
143-
part of their build. Otherwise, running the app immediately after build would
144-
not work. Another possible option is to only rewrite on `publish`, but that may
145-
introduce another confusing difference between `build` and `publish`. Currently,
146-
the `apphost` is the same between `build` and `publish` (with the exception of
147-
single-file, which is only a `publish` scenario).
138+
### Writing options on publish
139+
140+
This proposal writes the install location options in the `apphost` on `publish`.
141+
Without SDK support for constructing the layout, updating on `build` would cause
142+
the app to stop working in inner dev loop scenarios (running from output folder,
143+
`dotnet run`, F5) unless they create a layout with the runtime in the expected
144+
location relative to the app output as part of their build. This introduces a
145+
difference between `build` and `publish` for `apphost` (currently, it is the
146+
same between `build` and `publish` - with the exception of single-file, which is
147+
nly a `publish` scenario), but once SDK support is added it can be reconciled.
148148

149149
### Other hosts
150150

0 commit comments

Comments
 (0)