Adding a condition to exclude a registry check on certain builds.
authorDavid Mason <davmason@microsoft.com>
Fri, 20 Nov 2015 04:06:07 +0000 (20:06 -0800)
committerDavid Mason <davmason@microsoft.com>
Fri, 20 Nov 2015 04:06:07 +0000 (20:06 -0800)
src/mscorlib/src/System/Diagnostics/Eventing/EventProvider.cs

index 057d2d5..cd5b35e 100644 (file)
@@ -503,7 +503,7 @@ namespace System.Diagnostics.Tracing
                 providerInstance = (UnsafeNativeMethods.ManifestEtw.TRACE_PROVIDER_INSTANCE_INFO*)&structBase[providerInstance->NextOffset];
             }
 #else 
-#if !ES_BUILD_PCL   // TODO command arguments don't work on PCL builds...
+#if !ES_BUILD_PCL && !FEATURE_PAL   // TODO command arguments don't work on PCL builds...
             // Determine our session from what is in the registry.  
             string regKey = @"\Microsoft\Windows\CurrentVersion\Winevt\Publishers\{" + m_providerId + "}";
             if (System.Runtime.InteropServices.Marshal.SizeOf(typeof(IntPtr)) == 8)