When I run unit tests with Visual Studio it works fine, because it runs from project directory where all assemblies are. But when I run it with resharper it
Try this code for loading (see below). It will lookup assemblies independent of test runner.
private static string[] assemblyLookupPath = new[]
{
AppDomain.CurrentDomain.BaseDirectory,
Environment.CurrentDirectory,
Assembly.GetExecutingAssembly().Location
}.Distinct().ToArray();
public static void Assembly Load(string fileName)
{
var filePath = assemblyLookupPath
.Select(f=>Path.Combine(f, fileName))
.Where(File.Exists)
.FirstOrDefault();
/*do here null checks and raise errors, write logs, etc*/
return Assembly.LoadFrom(filePath )
}