I'm getting same error when trying to run xunit tests in parallel. Seems to be getting two different errors randomly. (all works fine if tests are run one at the time)
I used this to capture error:
try
{
// _store = new EmbeddableDocumentStore();
// _store.Initialize();
_store = NewDocumentStore(configureStore: ConfigureTestStore);
_store.Conventions.FindTypeTagName = t => t.Name;
}
catch (ReflectionTypeLoadException ex)
{
StringBuilder sb = new StringBuilder();
foreach (Exception exSub in ex.LoaderExceptions)
{
sb.AppendLine(exSub.Message);
FileNotFoundException exFileNotFound = exSub as FileNotFoundException;
if (exFileNotFound != null)
{
if (!string.IsNullOrEmpty(exFileNotFound.FusionLog))
{
sb.AppendLine("Fusion Log:");
sb.AppendLine(exFileNotFound.FusionLog);
}
}
sb.AppendLine();
}
string errorMessage = sb.ToString();
}
Here is error 1:
Could not load file or assembly 'Esent.Interop, Version=1.7.0.0, Culture=neutral, PublicKeyToken=8dd49bbdae3f61af' or one of its dependencies. The system cannot find the file specified.
Fusion Log:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\Daniel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Esent.Interop, Version=1.7.0.0, Culture=neutral, PublicKeyToken=8dd49bbdae3f61af
(Fully-specified)
LOG: Appbase = file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
Could not load file or assembly 'Esent.Interop, Version=1.7.0.0, Culture=neutral, PublicKeyToken=8dd49bbdae3f61af' or one of its dependencies. The system cannot find the file specified.
Fusion Log:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\Daniel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Esent.Interop, Version=1.7.0.0, Culture=neutral, PublicKeyToken=8dd49bbdae3f61af
(Fully-specified)
LOG: Appbase = file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
Could not load file or assembly 'Esent.Interop, Version=1.7.0.0, Culture=neutral, PublicKeyToken=8dd49bbdae3f61af' or one of its dependencies. The system cannot find the file specified.
Fusion Log:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\Daniel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Esent.Interop, Version=1.7.0.0, Culture=neutral, PublicKeyToken=8dd49bbdae3f61af
(Fully-specified)
LOG: Appbase = file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
Could not load file or assembly 'Jint, Version=2.4.0.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f' or one of its dependencies. The system cannot find the file specified.
Fusion Log:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\Daniel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Jint, Version=2.4.0.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f
(Fully-specified)
LOG: Appbase = file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Jint, Version=2.4.0.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f
LOG: Fusion is hosted. Check host about this assembly.
LOG: Try host assembly store with assembly jint, version=2.4.0.0, culture=neutral, publickeytoken=2e92ba9c8d81157f, processorarchitecture=x86.
LOG: Try host assembly store with assembly jint, version=2.4.0.0, culture=neutral, publickeytoken=2e92ba9c8d81157f, processorarchitecture=msil.
LOG: Try host assembly store with assembly jint, version=2.4.0.0, culture=neutral, publickeytoken=2e92ba9c8d81157f.
WRN: Host assembly store does not contain this assembly.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/Jint.DLL.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/Jint/Jint.DLL.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/Jint.EXE.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/Jint/Jint.EXE.
Could not load file or assembly 'Jint, Version=2.4.0.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f' or one of its dependencies. The system cannot find the file specified.
Fusion Log:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\Daniel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Jint, Version=2.4.0.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f
(Fully-specified)
LOG: Appbase = file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
----------------------
Here is error 2:
Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Fusion Log:
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\Daniel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Fusion is hosted. Check host about this assembly.
LOG: Try host assembly store with assembly system.net.http.formatting, version=5.2.2.0, culture=neutral, publickeytoken=31bf3856ad364e35, processorarchitecture=x86.
LOG: Try host assembly store with assembly system.net.http.formatting, version=5.2.2.0, culture=neutral, publickeytoken=31bf3856ad364e35, processorarchitecture=msil.
LOG: Try host assembly store with assembly system.net.http.formatting, version=5.2.2.0, culture=neutral, publickeytoken=31bf3856ad364e35.
WRN: Host assembly store does not contain this assembly.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/System.Net.Http.Formatting.DLL.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/System.Net.Http.Formatting/System.Net.Http.Formatting.DLL.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/System.Net.Http.Formatting.EXE.
LOG: Attempting download of new URL file:///C:/Users/Daniel/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta6/bin/System.Net.Http.Formatting/System.Net.Http.Formatting.EXE.