Skip to content

Commit

Permalink
Make the cache load the generated assembly using Assembly.LoadFrom so…
Browse files Browse the repository at this point in the history
… that Fusion automatically tries to load any assembly references automatically.
  • Loading branch information
HowardvanRooijen committed Jan 13, 2012
1 parent 15f1dd6 commit 1691e3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Rhino.DSL/DslCompilerContextCache.cs
Expand Up @@ -94,8 +94,9 @@ private CompilerContext LoadCompilerContext(string file)
{
WriteLock(delegate
{
byte[] bytes = File.ReadAllBytes(file);
assembly = Assembly.Load(bytes);
// Use Assembly.LoadFrom so that Fusion tries to resolve
// any assembly dependencies.
assembly = Assembly.LoadFrom(file);
assemblyCache[file] = assembly;
AssemblyLoaded(file, assembly, true);
});
Expand Down

0 comments on commit 1691e3f

Please sign in to comment.