diff --git a/source/Loom.Messaging/TypeResolver.cs b/source/Loom.Messaging/TypeResolver.cs index b20fa68..debca33 100644 --- a/source/Loom.Messaging/TypeResolver.cs +++ b/source/Loom.Messaging/TypeResolver.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; + using System.Reflection; public sealed class TypeResolver { @@ -29,8 +30,16 @@ private static ImmutableArray GetAllTypes() { AppDomain appDomain = AppDomain.CurrentDomain; - IEnumerable query = + // TODO: Remove the code to bypass the damn error after it fixed. + // https://github.com/microsoft/vstest/issues/2008 + string filter = "Microsoft.VisualStudio.TraceDataCollector"; + IEnumerable assemblies = from assembly in appDomain.GetAssemblies() + where assembly.FullName.StartsWith(filter) == false + select assembly; + + IEnumerable query = + from assembly in assemblies from type in assembly.GetTypes() select type;