Hi,
I've been using NCrunch quite a while in a project based on .NET 4.6.2 using MongoDB 2.4.4, compiled with Visual Studio 2017. After upgrading the project to .NET 4.7, NCrunch (3.20) started copying the wrong version of System.Runtime.InteropServices.RuntimeInformation.dll to _ncrunchreferences. Visual Studio shows the path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net47\lib\System.Runtime.InteropServices.RuntimeInformation.dll", with version 4.0.2. The respective assemblybinding setting in the app.config redirects to 4.0.2. This works fine for the xunit console test-runner and the ReSharper runner, but when using NCrunch to run the tests, the MongoDB internals throw a FileNotFoundException for version 4.0.0. NCrunch apparently found 4.0.0, copied it to _ncrunchreferences, but MongoDB only seems to accept 4.0.2 (probably due to the redirect to 4.0.2 introduced by the upgrade to .NET 4.7). I guess that NCrunch uses the assembly from the System.Runtime.InteropServices.RuntimeInformation Nuget package, which is 4.0.0, even though Visual Studio shows a different path in the reference properties of that assembly.
Now I enabled "Copy referenced assemblies to workspace", which apparently solves the problem. But it seems very strange, and NCrunch explicitly warns about the performance implications of this setting. How can I force NCrunch to avoid the assembly from the Nuget package? I can't uninstall it, because it's a dependency of MongoDB. It just should be ignored, just like Visual Studio does.
Best regards,
Malte