Custom xUnit Theory tests fail in CI test

Using xUnit I have a test that loads a .json file as a parameter to the test. I’m using something similar to this solution from Andrew Lock:

The test works fine locally, but in GitLab CI the test fails:

Microsoft (R) Test Execution Command Line Tool Version 16.0.1
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait…
[xUnit.net 00:00:02.78] xUnitTests.MyProj.MyProjTests.TranslateTest1 [FAIL]
Failed xUnitTests.MyProj.MyProjTests.TranslateTest1
Error Message:
System.NotSupportedException : Specified method is not supported.

Really could do with some help on this. Is there any more info you need to help diagnose what’s wrong here?