Skip to content

Commit

Permalink
Merge pull request #23 from BastianBlokland/fix/disable-tracelogger-o…
Browse files Browse the repository at this point in the history
…n-net46-mono

Disable tracelogger on net46 with mono backend
  • Loading branch information
BastianBlokland committed Nov 26, 2019
2 parents 6a068de + c581a33 commit e97989e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ComponentTask/Internal/TraceLogger.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/* Workaround for: https://github.com/BastianBlokland/componenttask-unity/issues/20
Disable the trace-logger on the '.Net 4.x' api in combination with the 'mono' scripting backend.
Reason is that the code-stripper (on all settings except 'Disabled') removes part of
'System.Configuration' on which 'System.Diagnostics.TraceListener' depends.
Because upm packages do not support 'link.xml' files at this time there is no easy way to instruct
the stripper not to remove those. Disabling is acceptable in this case as its only used as a log-sink
for 'Debug.Assert' and 'Debug.Fail' and either of those triggering would mean there is a serious bug
in this repository. */
#if !(ENABLE_MONO && NET_4_6)

using System.Diagnostics;

namespace ComponentTask.Internal
Expand Down Expand Up @@ -43,3 +53,5 @@ runs AFTER scene load and not before should give projects the chance to use thei
}
}
}

#endif // !(ENABLE_MONO && NET_4_6)

0 comments on commit e97989e

Please sign in to comment.