Closed nojaf closed 5 years ago
Hi! There are a bit too many moving parts here. Is it possible to try to reduce the complexity to see what is really going on? The error message says it can't read the runsettings file, and that seems to be due to the fact it cant load the systems xml component, which is weird. If you run this in a windows .net environment, does it then work?
(I assume this error will be the same with the latest adapter version, that is, I don't know of any changes there that would affect this)
I'm curious, why are you using dotnet test
to run your tests when they target .NET 4.5.2? It should work but we don't do much testing of that scenario with Mono. Normally people would use the NUnit Console to run tests in that scenario.
The odd thing is, dotnet test
running against a 4.5.2 target should load the .NET Framework version of the adapter which references version 4.0.0.0 of System.Xml.XPath.XmlDocument
. Even if it was loading the .NET Core version of the adapter, that has a dependency on System.Xml.XPath.XmlDocument
version =>4.3.0.
Hi, so this works on Windows.
I'm guessing on full framework it cannot resolve the System.Xml.XPath.XmlDocument
dll when the full framework is Mono. Same reason my own code uses netfx.props.
I believe this could actually fix it.
I use dotnet test
to tackle both targets in one command.
Description
When running
dotnet test ./src/Fantomas.Tests/Fantomas.Tests.fsproj -c Release --no-build --no-restore --test-adapter-path:. --logger:nunit;LogFilePath=../../TestResults.xml
I receive binding redirect problems when--test-adapter-path:. --logger:nunit;LogFilePath=../../TestResults.xml
is listed.I run
dotnet test
in Docker container with Mono.I think the problem is that
NUnitTestAdapter
cannot find System dll in Mono. Workaround might be including netfx.props.Info
Workaround
Leave the
--test-adapter-path:. --logger:nunit;LogFilePath=../../TestResults.xml
out.Steps to reproduce.
In container:
Maybe should need
chmod 755 *.sh
, if you cannot run the script.Run tests: