Hello,
when calling ArcGIS code from unit tests, I receive the following exception: "System.InvalidOperationException : Invalid ArcGISRuntime deployment folder, missing folder arcgisruntime100.9\client64".
Here are the steps I took / things I already found out to narrow down the problem:
- Tested with arcgisruntime 100.9 and 100.12 on .NET Framework 4.8
- Only happens when running the tests from the visual studio built-in test explorer (Resharper test explorer works fine)
- Only happens with xUnit framework (nUnit works fine)
- Only happens when the test project is built for x64 (which we need to do, haven't tried for x86, but AnyCPU works)
The deployment folder mentioned in the error message is the exact folder where runtimecore.dll etc. are copied to when platform is set to AnyCPU. I guess this is why the AnyCPU configuration works.
For x64, the .dlls are located directly in bin\x64\Debug, but the test runner seems to expect them to be in bin\x64\Debug\arcgisruntime100.9\client64.
I set the option "Processor Architecture for AnyCPU Projects" available in the VS test explorer settings to x64, but that did not help.
My guess is that the xUnit specific VS test runner is somehow still configured as AnyCPU, but I could not find any info on how to change that.
Steps to reproduce:
- Create a test project with the nuget packages Esri.ArcGISRuntime.WPF, xunit and xunit.runner.visualstudio.
- Set solution platform to x64.
- Run this test:
[Fact]
public void SomeTest()
{
ArcGISTiledLayer currentMapLayer = new ArcGISTiledLayer(new Uri("https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Imagery/MapServer")) { NoDataTileBehavior = NoDataTileBehavior.UpSample };
}
I know that this might be more a xunit related issue, but I was hoping you could still investigate.
Thanks