File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 88using Microsoft . VisualStudio . Text . Outlining ;
99using Microsoft . VisualStudio . Text . Projection ;
1010using Microsoft . VisualStudio . Utilities ;
11+ using System . Reflection ;
1112
1213namespace EditorUtils . UnitTest
1314{
@@ -90,7 +91,22 @@ public TestableSynchronizationContext TestableSynchronizationContext
9091
9192 public EditorHostTest ( )
9293 {
93- _editorHost = GetOrCreateEditorHost ( ) ;
94+ try
95+ {
96+ _editorHost = GetOrCreateEditorHost ( ) ;
97+ }
98+ catch ( ReflectionTypeLoadException e )
99+ {
100+ // When this fails in AppVeyor the error message is useless. Need to construct a more actionable
101+ // error message here.
102+ var builder = new StringBuilder ( ) ;
103+ builder . AppendLine ( e . Message ) ;
104+ foreach ( var item in e . LoaderExceptions )
105+ {
106+ builder . AppendLine ( item . Message ) ;
107+ }
108+ throw new Exception ( builder . ToString ( ) , e ) ;
109+ }
94110 _synchronizationContext = new TestableSynchronizationContext ( ) ;
95111 _synchronizationContext . Install ( ) ;
96112 }
You can’t perform that action at this time.
0 commit comments