File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ protected override IContainer CreateContainer()
6868 var assemblies = assemblyResolver . GetAssemblyPaths ( currentDirectory ) ;
6969
7070 var aggregateCatalog = new AggregateCatalog ( ) ;
71+ bool assemblyLoadFailures = false ;
72+
7173 foreach ( var assembly in assemblies )
7274 {
7375 try
@@ -78,11 +80,17 @@ protected override IContainer CreateContainer()
7880 }
7981 catch ( Exception ex )
8082 {
81- this . Logger . WarnFormat ( "Failed loading Assembly {0}" , assembly ) ;
82- this . Logger . Debug ( ex . Message ) ;
83+ assemblyLoadFailures = true ;
84+ Logger . DebugFormat ( "Failure loading assembly: {0}. Exception: {1}" , assembly , ex . Message ) ;
8385 }
8486 }
85-
87+ if ( assemblyLoadFailures )
88+ {
89+ if ( _scriptName == null || _scriptName . Length == 0 )
90+ Logger . Warn ( "Some assemblies failed to load. Launch with '-repl -loglevel debug' to see the details" ) ;
91+ else
92+ Logger . Warn ( "Some assemblies failed to load. Launch with '-loglevel debug' to see the details" ) ;
93+ }
8694 builder . RegisterComposablePartCatalog ( aggregateCatalog ) ;
8795 }
8896
You can’t perform that action at this time.
0 commit comments