Skip to content

Commit 1cbe9a5

Browse files
committed
Testing out Fixes for #3
1 parent da65c4b commit 1cbe9a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/edge-scs.dll

0 Bytes
Binary file not shown.

src/edge-scs/EdgeCompiler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class EdgeCompiler
2626
private static ScriptConsole _console;
2727
private static ILog _logger;
2828
private static IInitializationServices _initializationServices;
29+
private static string _libPath;
2930

3031
static EdgeCompiler()
3132
{
@@ -39,8 +40,8 @@ static EdgeCompiler()
3940
_initializationServices = new InitializationServices(_logger, overrides);
4041

4142
var resolver = _initializationServices.GetAppDomainAssemblyResolver();
42-
var dir = Path.GetDirectoryName(typeof (EdgeCompiler).Assembly.Location);
43-
var assemblies = Directory.GetFiles(dir, "*.dll");
43+
_libPath = Path.GetDirectoryName(typeof (EdgeCompiler).Assembly.Location);
44+
var assemblies = Directory.GetFiles(_libPath, "*.dll");
4445
resolver.AddAssemblyPaths(assemblies);
4546
}
4647

@@ -97,7 +98,6 @@ private IScriptExecutor GetExecutor(List<string> references, string rootPath)
9798
{
9899

99100
var builder = new ScriptServicesBuilder(_console, _logger, initializationServices: _initializationServices).
100-
Debug(true).
101101
ScriptName("");
102102

103103
builder.LoadModules("csx");
@@ -109,7 +109,7 @@ private IScriptExecutor GetExecutor(List<string> references, string rootPath)
109109
executor.Initialize(paths, packs);
110110

111111
executor.AddReferences(references.ToArray());
112-
var reference = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\ScriptCs.Contracts.dll";
112+
var reference = Path.Combine(_libPath, "ScriptCs.Contracts.dll");
113113
executor.AddReferences(reference);
114114
executor.ImportNamespaces("ScriptCs.Contracts");
115115
return executor;

0 commit comments

Comments
 (0)