Remove circular dependency from System.Diagnostics.Tracing
authorEric St. John <ericstj@microsoft.com>
Wed, 13 May 2015 22:05:57 +0000 (15:05 -0700)
committerEric St. John <ericstj@microsoft.com>
Wed, 13 May 2015 22:05:57 +0000 (15:05 -0700)
EventSource was recently changed to depend on System.Collections.Concurrent, which is a problem since System.Collections.Concurrent itself uses eventsource.  This cycle caused issues during package resolution (NUGET/DNX fails fast when it finds  a cycle) and would also cause problems during cross-gen.

Desktop & CoreCLR do not have this cycle since ConcurrentDictionary and EventSource both live in mscorlib.  This is only a problem for N.

According to @VanceM the FEATURE_ACTIVITYSAMPLING that requires ConcurrentDictionary is not needed for ProjectN so we are disabling it.  The feature is not needed for CoreCLR either, so even though we don't care about the cycle we'll remove the feature for consistency.

[tfs-changeset: 1470229]

src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs

index 835e490..863c4db 100644 (file)
@@ -7,7 +7,7 @@
 
 #define FEATURE_MANAGED_ETW
 
-#if !ES_BUILD_STANDALONE
+#if !ES_BUILD_STANDALONE && !CORECLR && !PROJECTN
 #define FEATURE_ACTIVITYSAMPLING
 #endif // !ES_BUILD_STANDALONE