While running my tests, I noticed that if I ran my test suite all together, some would fail, giving the exception:
API restriction: The assembly has already loaded from a different location
This issue was happening both in ReSharper test runner, and using the NUnit test runner
Debugging, the exception was being thrown on my SetUp methods like:
[SetUp]
public void SetUp()
{
_myFake = A.Fake<ISomething>();
I posted about this on StackOverflow, and tweeted contributors of the FakeItEasy project.
At the time of writing, there is an immediate workaround:
Run tests in parallel.
To do this for the ReSharper test runner, do the following:
Options -> Unit Testing -> Run up to x assemblies in parallel.
(Set to anything greater than 1)

An issue has been created on GitHub for this:
2 responses to “Unit tests failing when run all together with FakeItEasy”
Thanks for posting this. Just one small mistake, the GitHub issue is https://github.com/FakeItEasy/FakeItEasy/issues/189
For readers benefit – the issue has been fixed and will form part of the next release of FakeItEasy – version 1.15.
Thanks, I have updated it.