Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the way assembly references are loaded. #430

Merged
merged 1 commit into from Oct 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Cake.Core/Scripting/ScriptRunner.cs
Expand Up @@ -77,7 +77,7 @@ public void Run(IScriptHost host, FilePath scriptPath, IDictionary<string, strin
{
if (host.Context.FileSystem.Exist((FilePath)reference))
{
var assembly = Assembly.LoadFile(reference);
var assembly = Assembly.LoadFrom(reference);
assemblies.Add(assembly);
}
else
Expand Down Expand Up @@ -144,7 +144,7 @@ private static IEnumerable<Assembly> GetDefaultAssemblies(IFileSystem fileSystem
var cakeAssemblies = assemblyDirectory.GetFiles(pattern, SearchScope.Current);
foreach (var cakeAssembly in cakeAssemblies)
{
var assembly = Assembly.LoadFile(cakeAssembly.Path.FullPath);
var assembly = Assembly.LoadFrom(cakeAssembly.Path.FullPath);
defaultAssemblies.Add(assembly);
loaded.Add(pattern);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cake/Scripting/Mono/MonoScriptSession.cs
Expand Up @@ -56,7 +56,7 @@ public void AddReference(FilePath path)
throw new ArgumentNullException("path");
}
_log.Debug("Adding reference to {0}...", path.FullPath);
_evaluator.ReferenceAssembly(Assembly.LoadFile(path.FullPath));
_evaluator.ReferenceAssembly(Assembly.LoadFrom(path.FullPath));
}

public void AddReference(Assembly assembly)
Expand Down