File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -74,17 +74,15 @@ private static void GenerateWrapper()
74
74
Console . ReadKey ( ) ;
75
75
}
76
76
77
-
78
- private static void Main ( string [ ] args )
77
+ private static Assembly AssemblyResolveEventHandler ( object sender , ResolveEventArgs args )
79
78
{
80
- // Console.WriteLine("App config path: " + Settings.Default);
81
-
82
79
try
83
80
{
84
- GenerateWrapper ( ) ;
81
+ return Assembly . Load ( args . Name ) ;
85
82
}
86
83
catch ( FileNotFoundException e )
87
84
{
85
+ Console . Error . WriteLine ( $ "ERROR! '{ args . RequestingAssembly } ' failed to load '{ args . Name } '.") ;
88
86
Console . Error . WriteLine ( "ERROR!" ) ;
89
87
Console . Error . WriteLine ( "ERROR! Fusion Log:" ) ;
90
88
Console . Error . WriteLine ( e . FusionLog ) ;
@@ -94,8 +92,17 @@ private static void Main(string[] args)
94
92
Console . Error . WriteLine ( "ERROR!" ) ;
95
93
Console . Error . WriteLine ( "ERROR! FileNotFoundException:" ) ;
96
94
Console . Error . WriteLine ( e ) ;
97
- throw ;
98
95
}
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 ( ) ;
99
106
}
100
107
}
101
108
}
You can’t perform that action at this time.
0 commit comments