Content/build.fsx: use CreateProcess #32
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Use CreateProcess instead of Process.start
Issue
If I go through the "How to start" guide for Saturn:
https://saturnframework.org/tutorials/how-to-start.html
when I run the last step:
the webserver does indeed appear to start. I can go to http://localhost:8085/books and see the resulting application.
However, if I ctrl-c at the console to stop the webserver, I notice the following:
On Windows, the browser is never launched.
Changes
The following line:
was replaced with the following:
Notes
Some discussion of the issue on stackoverflow:
https://stackoverflow.com/questions/66139159/process-start-being-used-to-launch-browser-but-is-now-deprecated
Thanks to user
nh2
who made the suggestion to take a look at how Plotly.NET launches browsers:https://stackoverflow.com/a/66184603/268581