Fix building on desktop bug dotnet/coreclr#234633. (dotnet/coreclr#6045)
authorMike McLaughlin <mikem@microsoft.com>
Wed, 29 Jun 2016 15:52:57 +0000 (08:52 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Jun 2016 15:52:57 +0000 (08:52 -0700)
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

index 5c56efb..480d40a 100644 (file)
@@ -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]