#if !CORECLR && !ES_BUILD_PN
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
#endif // !CORECLR && !ES_BUILD_PN
- internal struct EventDescriptor
+
+ /*
+ EventDescriptor was public in the separate System.Diagnostics.Tracing assembly(pre NS2.0),
+ now the move to CoreLib marked them as private.
+ While they are technically private (it's a contract used between the library and the ILC toolchain),
+ we need them to be rooted and exported from shared library for the system to work.
+ For now I'm simply marking them as public again.A cleaner solution might be to use.rd.xml to
+ root them and modify shared library definition to force export them.
+ */
+#if ES_BUILD_PN
+ public
+#else
+ internal
+#endif
+ struct EventDescriptor
{
# region private
[FieldOffset(0)]
/// descriptor as well as some stuff we added specifically for EventSource. see the
/// code:m_eventData for where we use this.
/// </summary>
- internal partial struct EventMetadata
+
+ /*
+ EventMetadata was public in the separate System.Diagnostics.Tracing assembly(pre NS2.0),
+ now the move to CoreLib marked them as private.
+ While they are technically private (it's a contract used between the library and the ILC toolchain),
+ we need them to be rooted and exported from shared library for the system to work.
+ For now I'm simply marking them as public again.A cleaner solution might be to use.rd.xml to
+ root them and modify shared library definition to force export them.
+ */
+#if ES_BUILD_PN
+ public
+#else
+ internal
+#endif
+ partial struct EventMetadata
{
public EventDescriptor Descriptor;
public EventTags Tags;
/// <summary>
/// Exception that is thrown when an error occurs during EventSource operation.
/// </summary>
-#if (!ES_BUILD_PCL && !ES_BUILD_PN)
+#if !ES_BUILD_PCL
[Serializable]
#endif
public class EventSourceException : Exception
/// </summary>
public EventSourceException(string message, Exception innerException) : base(message, innerException) { }
-#if (!ES_BUILD_PCL && !ES_BUILD_PN)
+#if !ES_BUILD_PCL
/// <summary>
/// Initializes a new instance of the EventSourceException class with serialized data.
/// </summary>
#if ES_BUILD_PN
namespace System
{
- public static class AppDomain
+ internal static class AppDomain
{
public static int GetCurrentThreadId()
{