in code/SFBinaryLoaderForContainers/SFBinaryLoader.cs [22:47]
private static Assembly LoadFromFabricCodePath(object sender, ResolveEventArgs args)
{
string assemblyName = new AssemblyName(args.Name).Name;
if (string.IsNullOrEmpty(SFCodePath))
{
throw new InvalidOperationException("The path from where to resolve the Service Fabric binaries has not been set; please try calling SFBinaryLoader.Initialize().");
}
try
{
string assemblyPath = Path.Combine(SFCodePath, assemblyName + ".dll");
if (File.Exists(assemblyPath))
{
return Assembly.LoadFrom(assemblyPath);
}
}
catch (Exception e)
{
// Supress any Exception so that we can continue to
// load the assembly through other means
Console.WriteLine("Exception in LoadFromFabricCodePath={0}", e.ToString());
}
return null;
}