TypeLoadException

If you get a TypeLoadException when loading one of the FakeXrmEasy packages, it might be that a fix to one package was pushed to nuget (i.e. FakeXrmEasy.Core) and some of the packages that depend on it (i.e. FakeXrmEasy.Plugins) are referencing an older version.

At runtime, the plugins package will search for the exact version it depends on and it’ll fail.

An easy fix is adding a binding redirect to the solution.

Here’s an example in the samples repository where a fix for the Core package was released, but the Plugins package was still referencing an early version.

After adding the binding redirect the plugins will use the version specified in the binding redirect.

https://github.com/DynamicsValue/fake-xrm-easy-samples/blob/main/tests/PowerAppsBootCamp.Plugins.Tests/PowerAppsBootCamp.Plugins.Tests/app.config#L6-L12