diff --git a/src/Adapter/MSTest.CoreAdapter/Execution/StackTraceHelper.cs b/src/Adapter/MSTest.CoreAdapter/Execution/StackTraceHelper.cs
index d9cd047216..78766ee924 100644
--- a/src/Adapter/MSTest.CoreAdapter/Execution/StackTraceHelper.cs
+++ b/src/Adapter/MSTest.CoreAdapter/Execution/StackTraceHelper.cs
@@ -20,7 +20,7 @@ internal static class StackTraceHelper
///
/// Type that need to be excluded.
///
- private static List typesToBeExcluded;
+ private static List typesToBeExcluded = new List() { typeof(Microsoft.VisualStudio.TestTools.UnitTesting.Assert).Namespace, typeof(MSTestExecutor).Namespace };
///
/// Gets the types whose methods should be ignored in the reported call stacks.
@@ -30,13 +30,6 @@ private static List TypeToBeExcluded
{
get
{
- if (typesToBeExcluded == null)
- {
- typesToBeExcluded = new List();
- typesToBeExcluded.Add(typeof(Microsoft.VisualStudio.TestTools.UnitTesting.Assert).Namespace);
- typesToBeExcluded.Add(typeof(MSTestExecutor).Namespace);
- }
-
return typesToBeExcluded;
}
}