-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
Seems NET9 changes the System.AppContext.BaseDirectory
and AppDomain.CurrentDomain.BaseDirectory
to UNC paths:
\\?\UNC\rwells\very\special\bin\Development\net9.0\NLog.config
\\?\C:\Temp\NLog.config
These paths cannot be handled by Uri
-object, which is used inside XmlReader for loading NLog.config-file. Uri throws System.UriFormatException - Invalid URI: The hostname could not be parsed.
.
Possible work-around is to manually read the contents of the NLog.config-file, and give the stream/string to the XmlReader (Only apply work-around when path starts with \\?\
)