public static List <string> GetCompiledCustomAssembliesReferences(ScriptAssembly scriptAssembly, IDictionary <string, TargetAssembly> customTargetAssemblies, string outputDirectory) { var references = new List <string>(); if (customTargetAssemblies != null) { foreach (var entry in customTargetAssemblies) { var customTargetAssembly = entry.Value; var customTargetAssemblyPath = customTargetAssembly.FullPath(outputDirectory); // File might not exist if there are no scripts in the custom target assembly folder. if (AssetPath.Exists(customTargetAssemblyPath)) { references.Add(customTargetAssemblyPath); } } } return(references); }