From 6d068a0b8156db5ad038c914ef2b4243e8c47226 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Wed, 29 Jun 2016 08:52:57 -0700 Subject: [PATCH] Fix building on desktop bug dotnet/coreclr#234633. (dotnet/coreclr#6045) ifdef the references to System.Diagnostic.StackFrame. Commit migrated from https://github.com/dotnet/coreclr/commit/6c417022545b9f1e134100962909795a5958ca1f --- src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs index 5c56efb..480d40a 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs @@ -61,11 +61,13 @@ namespace System.Diagnostics { IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, out string sourceFile, out int sourceLine, out int sourceColumn); +#if FEATURE_CORECLR private static Type s_symbolsType = null; private static MethodInfo s_symbolsMethodInfo = null; [ThreadStatic] private static int t_reentrancy = 0; +#endif public StackFrameHelper(Thread target) { @@ -109,6 +111,7 @@ namespace System.Diagnostics { { StackTrace.GetStackFramesInternal(this, iSkip, fNeedFileInfo, exception); +#if FEATURE_CORECLR if (!fNeedFileInfo) return; @@ -161,10 +164,12 @@ namespace System.Diagnostics { { t_reentrancy--; } +#endif } void IDisposable.Dispose() { +#if FEATURE_CORECLR if (getSourceLineInfo != null) { IDisposable disposable = getSourceLineInfo.Target as IDisposable; @@ -173,6 +178,7 @@ namespace System.Diagnostics { disposable.Dispose(); } } +#endif } [System.Security.SecuritySafeCritical] -- 2.7.4