I've got a set on unit tests, which, if I run all together (using resharper) I get this error:
SetUp : System.TypeInitializationException : The type initializer for 'FakeItEasy.Core.FakeScope' threw an exception. ----> System.IO.FileLoadException : API restriction: The assembly 'file:///C:\Users\abrown\Documents\Repos\ink.services.jetstar\My.Namespace.Tests.Unit\bin\Debug\My.Namespace.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
If I run them individually, they pass.
Further down in the exception, it's failing on lines like this:
[SetUp]
public void SetUp()
{
_myFake = A.Fake<ISomething>();
EDIT
This also happens if I use the 'standard' NUnit Test Runner.
As @david-arno said in the comments, by changing the settings in the ReSharper runner, that fixes it (obviously only for re-sharper)
For completeness, here's a full stack trace
My.CompanyNamespace.ProjectName.Tests.Unit.DownloadAndStoreContentTests.gets_content_downloader_for_each_section_in_index: SetUp : System.TypeInitializationException : The type initializer for 'FakeItEasy.Core.FakeScope' threw an exception. ----> System.IO.FileLoadException : API restriction: The assembly 'file:///C:\Users\abrown\Documents\Repos\My.CompanyNamespace\My.CompanyNamespace.ProjectName.Tests.Unit\bin\Debug\My.CompanyNamespace.ProjectName.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
at FakeItEasy.Core.FakeScope.get_Current() at FakeItEasy.IoC.DictionaryContainer.<>c_DisplayClass1
1.<Register>b__0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.Resolve[T]() at FakeItEasy.RootModule.<RegisterDependencies>b__3(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1
1.b_0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.ResolveT at FakeItEasy.RootModule.b_1a(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.<>c_DisplayClass11.<Register>b__0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.Resolve[T]() at FakeItEasy.RootModule.<RegisterDependencies>b__19(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1
1.b__0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.ResolveT at FakeItEasy.A.FakeT at My.CompanyNamespace.ProjectName.Tests.Unit.DownloadAndStoreContentTests.SetUp() in c:\Users\abrown\Documents\Repos\My.CompanyNamespace\My.CompanyNamespace.ProjectName.Tests.Unit\DownloadAndStoreContentTests.cs:line 23 --FileLoadException at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile) at FakeItEasy.Core.ApplicationDirectoryAssembliesTypeCatalogue.GetAllAvailableAssemblies() at FakeItEasy.Core.ApplicationDirectoryAssembliesTypeCatalogue..ctor() at FakeItEasy.ImportsModule.b_1(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.SingletonResolver1.UnresolvedState.Resolve(DictionaryContainer container) at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1
1.b_0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.ResolveT at FakeItEasy.ImportsModule.b_0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.SingletonResolver1.UnresolvedState.Resolve(DictionaryContainer container) at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1
1.b_0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.ResolveT at FakeItEasy.ImportsModule.b_4[T](DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.SingletonResolver1.UnresolvedState.Resolve(DictionaryContainer container) at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1
1.b__0(DictionaryContainer c) at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType) at FakeItEasy.ServiceLocator.ResolveT at FakeItEasy.Core.FakeScope.RootScope..ctor() at FakeItEasy.Core.FakeScope..cctor()