Skip to content

Commit

Permalink
Bypass VSTest bug
Browse files Browse the repository at this point in the history
Bypass the problem that the test runner cannot load types from assembly
'Microsoft.VisualStuduo.TraceDataCollector'.

microsoft/vstest#2008
  • Loading branch information
gyuwon committed Jun 2, 2019
1 parent 0baadb5 commit e243f3c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/Loom.Messaging/TypeResolver.cs
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Reflection;

public sealed class TypeResolver
{
Expand All @@ -29,8 +30,16 @@ private static ImmutableArray<Type> GetAllTypes()
{
AppDomain appDomain = AppDomain.CurrentDomain;

IEnumerable<Type> 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<Assembly> assemblies =
from assembly in appDomain.GetAssemblies()
where assembly.FullName.StartsWith(filter) == false
select assembly;

IEnumerable<Type> query =
from assembly in assemblies
from type in assembly.GetTypes()
select type;

Expand Down

0 comments on commit e243f3c

Please sign in to comment.