Closed andrew-moore-octo closed 4 years ago
@andrew-moore-octo
Thanks for reporting.
A possible solution would be to use the netstandard code if running in mono. (Detecting mono can be done like : https://stackoverflow.com/questions/721161/how-to-detect-which-net-runtime-is-being-used-ms-vs-mono)
I'll take a look.
@andrew-moore-octo
I did update the code, can you try a preview version from MyGet : XPath2.1.0.12.nupkg
?
(MyGet : https://www.myget.org/feed/xpath2/package/nuget/XPath2/1.0.12) Details on how to use MyGet: https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@StefH Thanks for fixing that so quickly! I've tested version 1.0.12 against the following runtimes:
Everything is working perfectly 👍
New official version will be released soon.
XPath2Expression.Compile
throws an exception in Mono. It appears that theXmlCharType.bin
resource doesn't exist inSystem.Xml
under Mono, which causes this line to throw a NullReferenceException.From my brief experiments, it looks like using the netstandard version of
InitInstance
works okay on Mono, although I'm not sure if there would be any side effects to using that instead.Minimal code example
Steps to repro
mono MonoTest.exe
Affected versions
Mono versions: 4.4.2 and 6.10.0 (latest available through
choco
at time of writing) Xpath2 versions: 1.0.11