Add Working Directory to .nxm Handler & Remove Default Host Builder (fixes #513) #555
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.
[Change] Added Working Directory to Protocol Registration
On Linux, this involved setting the
Path=
field inside the.desktop
file as specified in the original PR.On Windows, it was a matter of adding an additional value named
WorkingDirectory
, under the same registry key as the default commandline itself.Investigation: Folder Scanning
Original issue (#513) mentions, that the Default Host Builder is scanning the current working directory recursively.
I had a look into its code; and found out that it was searching for
appconfig.json
and its possible variants (e.g.appconfig.Development.json
; which are part of the default MSFT configuration system.It was searching up from what it set as the default
Content Root
, which defaults to current working directory inHost.CreateDefaultBuilder
. It is possible to replace this after the fact before callingBuild()
, however...In the case of the App, we switched from using the default config system to a custom solution a while back; the reasoning being that the default implementation does not have a means of customizing how the data is deserialized; and we needed to deserialize types that are dependent on our custom serialization system in the DataModel.
[Change] Removed
Host.CreateDefaultBuilder
OutrightAt first I considered just fixing the content root, however I've done a quick investigation into the functionality of
Host.CreateDefaultBuilder
to see how much we use from it; as I was curious, especially given that we usually roll our own stuff in the app.Given that we don't use any of its functionality, I removed the default host builder from App & Unit Tests, then verified that basic functionality works.