@@ -129,7 +129,7 @@ private static MetadataReference[] GetReferences(CSTOJSOptions options)
129129
130130 string ? assemblyPath = Path . GetDirectoryName ( assembly ? . Location ) ;
131131 string ? objectAssemblyPath = Path . GetDirectoryName ( typeof ( object ) . Assembly . Location ) ;
132- string ? binPath = Directory . Exists ( "./bin/" ) ? "./bin/" : null ;
132+ string ? customPath = Directory . Exists ( options . CustomPathToDLLs ) ? options . CustomPathToDLLs : null ;
133133
134134 if ( assemblyNames . Length > 0 )
135135 {
@@ -176,9 +176,9 @@ private static MetadataReference[] GetReferences(CSTOJSOptions options)
176176 if ( File . Exists ( Path . Combine ( objectAssemblyPath , "System.Console.dll" ) ) )
177177 assemblyMetadata . Add ( MetadataReference . CreateFromFile ( Path . Combine ( objectAssemblyPath , "System.Console.dll" ) ) ) ;
178178 }
179- if ( binPath != null )
179+ if ( customPath != null )
180180 {
181- string [ ] files = Directory . GetFiles ( binPath , "*.dll" , SearchOption . AllDirectories ) ;
181+ string [ ] files = Directory . GetFiles ( customPath , "*.dll" , SearchOption . AllDirectories ) ;
182182 for ( int j = 0 ; j < files . Length ; j ++ )
183183 {
184184 assemblyMetadata . Add ( MetadataReference . CreateFromFile ( files [ j ] ) ) ;
@@ -188,14 +188,16 @@ private static MetadataReference[] GetReferences(CSTOJSOptions options)
188188 {
189189 Log . InfoLine ( $ "+++") ;
190190
191- Log . InfoLine ( $ "assemblyPath: { assemblyPath } ") ;
192- Log . InfoLine ( $ "objectAssemblyPath: { objectAssemblyPath } ") ;
193- Log . InfoLine ( $ "binPath: { binPath } ") ;
191+ Log . InfoLine ( $ "assemblyPath: ' { assemblyPath } ' ") ;
192+ Log . InfoLine ( $ "objectAssemblyPath: ' { objectAssemblyPath } ' ") ;
193+ Log . InfoLine ( $ "binPath: ' { customPath } ' ") ;
194194
195195 foreach ( MetadataReference metadata in assemblyMetadata )
196196 {
197197 Log . WriteLine ( metadata . Display ?? "null display string" ) ;
198198 }
199+
200+ Log . InfoLine ( $ "assemblyMetadata count: '{ assemblyMetadata . Count } '") ;
199201 Log . InfoLine ( $ "---") ;
200202 }
201203
@@ -214,6 +216,7 @@ private static MetadataReference[] GetReferences(CSTOJSOptions options)
214216 Log . WriteLine ( references [ j ] . Display ?? "null display string" ) ;
215217
216218 }
219+ Log . InfoLine ( $ "references length: '{ references . Length } '") ;
217220 Log . InfoLine ( $ "+++") ;
218221 }
219222
0 commit comments