diff --git a/src/Compilers/Core/Portable/InternalUtilities/FailFast.cs b/src/Compilers/Core/Portable/InternalUtilities/FailFast.cs
index ea6d87c5c3513601da137cc8b68ed3533701873f..00ef07a4c43922c704a0b25244b870d812379469 100644
--- a/src/Compilers/Core/Portable/InternalUtilities/FailFast.cs
+++ b/src/Compilers/Core/Portable/InternalUtilities/FailFast.cs
@@ -18,6 +18,15 @@ internal static void OnFatalException(Exception exception)
Debugger.Break();
}
+#if !NETFX20
+ // don't fail fast with an aggregate exception that is masking true exception
+ var aggregate = exception as AggregateException;
+ if (aggregate != null && aggregate.InnerExceptions.Count == 1)
+ {
+ exception = aggregate.InnerExceptions[0];
+ }
+#endif
+
Environment.FailFast(exception.ToString(), exception);
}
diff --git a/src/ExpressionEvaluator/Core/Source/ResultProvider/NetFX20/ResultProvider.NetFX20.csproj b/src/ExpressionEvaluator/Core/Source/ResultProvider/NetFX20/ResultProvider.NetFX20.csproj
index 156d3b470441bca0de57b5375a030c535ef110bc..1d74a2c828c72e439b824cbfd294b8c6ba0fee52 100644
--- a/src/ExpressionEvaluator/Core/Source/ResultProvider/NetFX20/ResultProvider.NetFX20.csproj
+++ b/src/ExpressionEvaluator/Core/Source/ResultProvider/NetFX20/ResultProvider.NetFX20.csproj
@@ -76,8 +76,14 @@
false
-
-
+
+ TRACE;DEBUG;NETFX20
+ false
+
+
+ TRACE;NETFX20
+ true
+
Resources.Designer.cs
@@ -102,4 +108,4 @@
-
+
\ No newline at end of file