@@ -83,7 +83,7 @@ public IEnumerable<string> GetDiagnostics()
8383 public List < INamedTypeSymbol > GetAllTypes ( )
8484 {
8585 if ( _allTypes != null ) return _allTypes ;
86-
86+
8787 var compilation = GetProjectCompilation ( ) ;
8888
8989 var visitor = new SymbolDiscoveryVisitor ( ) ;
@@ -175,22 +175,22 @@ public static RoslynTypeLocator FromProjectContext(RoslynProjectContext project)
175175 {
176176 var workspace = new RoslynWorkspace ( project . MsBuildProjectContext , project . MsBuildProjectContext . Configuration ) ;
177177
178- workspace . WorkspaceFailed += ( object sender , WorkspaceDiagnosticEventArgs e ) =>
179- {
180- if ( e . Diagnostic . Kind == WorkspaceDiagnosticKind . Failure )
181- {
182-
183- // NB: Ultimately an InvalidCast happens with the TypeScript FindConfigFilesTask (compiled
184- // against v4.0 of Microsoft.Build) trying to cast to a ITask in Microsoft.Build v15.0
185- // Therefore we must ignore an empty error message.
186- Debug . WriteLine ( e . Diagnostic . Message ) ;
187- if ( ! e . Diagnostic . Message . Contains (
188- "Unable to cast object of type 'Microsoft.CodeAnalysis.BuildTasks.Csc' to type 'Microsoft.Build.Framework.ITask'." ) )
189- {
190- throw new InvalidProjectFileException ( e . Diagnostic . Message ) ;
191- }
192- }
193- } ;
178+ // workspace.WorkspaceFailed += (object sender, WorkspaceDiagnosticEventArgs e) =>
179+ // {
180+ // if (e.Diagnostic.Kind == WorkspaceDiagnosticKind.Failure)
181+ // {
182+
183+ // // NB: Ultimately an InvalidCast happens with the TypeScript FindConfigFilesTask (compiled
184+ // // against v4.0 of Microsoft.Build) trying to cast to a ITask in Microsoft.Build v15.0
185+ // // Therefore we must ignore an empty error message.
186+ // Debug.WriteLine(e.Diagnostic.Message);
187+ // if (!e.Diagnostic.Message.Contains(
188+ // "Unable to cast object of type 'Microsoft.CodeAnalysis.BuildTasks.Csc' to type 'Microsoft.Build.Framework.ITask'."))
189+ // {
190+ // throw new InvalidProjectFileException(e.Diagnostic.Message);
191+ // }
192+ // }
193+ // };
194194
195195 return new RoslynTypeLocator ( workspace , project ) ;
196196 }
0 commit comments