File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,17 +74,15 @@ private static void GenerateWrapper()
7474 Console . ReadKey ( ) ;
7575 }
7676
77-
78- private static void Main ( string [ ] args )
77+ private static Assembly AssemblyResolveEventHandler ( object sender , ResolveEventArgs args )
7978 {
80- // Console.WriteLine("App config path: " + Settings.Default);
81-
8279 try
8380 {
84- GenerateWrapper ( ) ;
81+ return Assembly . Load ( args . Name ) ;
8582 }
8683 catch ( FileNotFoundException e )
8784 {
85+ Console . Error . WriteLine ( $ "ERROR! '{ args . RequestingAssembly } ' failed to load '{ args . Name } '.") ;
8886 Console . Error . WriteLine ( "ERROR!" ) ;
8987 Console . Error . WriteLine ( "ERROR! Fusion Log:" ) ;
9088 Console . Error . WriteLine ( e . FusionLog ) ;
@@ -94,8 +92,17 @@ private static void Main(string[] args)
9492 Console . Error . WriteLine ( "ERROR!" ) ;
9593 Console . Error . WriteLine ( "ERROR! FileNotFoundException:" ) ;
9694 Console . Error . WriteLine ( e ) ;
97- throw ;
9895 }
96+
97+ return null ;
98+ }
99+
100+ private static void Main ( string [ ] args )
101+ {
102+ // Console.WriteLine("App config path: " + Settings.Default);
103+
104+ AppDomain . CurrentDomain . AssemblyResolve += new ResolveEventHandler ( AssemblyResolveEventHandler ) ;
105+ GenerateWrapper ( ) ;
99106 }
100107 }
101108}
You can’t perform that action at this time.
0 commit comments