2

The official release notes say:

Improved compatibility with the EventSource nuget package

  • SLAB's source must be updated and rebuilt to work with the EventSource nuget package (which supports channels, but does not support sampling). The process is now fairly painless.
    • Added references to the EventSource nuget package to all projects
    • Changed System.Diagnostics.Tracing to Microsoft.Diagnostics.Tracing in all source files
    • Defined the EVENT_SOURCE_PACKAGE constant in the unit test project (to disable tests that cannot possibly work with the nuget version).

This is a bit cryptic. Something seems backwards because I can't see any references at all to Microsoft.Diagnostics.Tracing in the Nuget download.

Or are the sub-bullets things that you have to do to get it to build (so it should say, Add, Change, Define instead of Added, Changed, Defined)?

Hm, well those instructions (if they are instructions) are not sufficient:

  • There are three places where Microsoft.Diagnostics.Tracing is already referenced, so that gives duplicate warnings
  • There are multiple places where ambiguities appear between Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.Configuration.EventSourceSettings (which is a class) and Microsoft.Diagnostics.Tracing.EventSourceSettings (which is an enum).
Benjol
  • 57,639
  • 51
  • 180
  • 252

3 Answers3

1

A bit of detective work and common sense:

The last release date of SLAB is 25 July 2014, there have been a whole load of versions of Microsoft.Diagnostics.Tracing.EventSource, including one which presumably innocently introduced EventSourceSettings.

If I install and reference version 1.0.26, the instructions work.

Now just have to find out what things from version 1.1.28 are missing, and whether I miss them.

Benjol
  • 57,639
  • 51
  • 180
  • 252
  • How did you get this working? When I try to enable events the enableEvents() method is expecting System.Diagnostics.Tracing.EventSource as a parameter. Do you have an example of how you enabled events to make Slab working with Microsoft.Diagnostics.Tracing.EventSource? – Philipp Stauss Mar 11 '16 at 13:26
  • @Philipp, "Changed System.Diagnostics.Tracing to Microsoft.Diagnostics.Tracing in all source files", but to be honest, I've abandoned since, so no promises – Benjol Mar 11 '16 at 17:28
1

So, I just made SLAB work with the NuGet EventSource packages by following the directions above with SLAB 1.1.28 and the latest NuGet EventSource from the Microsoft.Diagnostics.Tracing.EventSource namespace.

Essentially, you need to fix up the ambiguous references between Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.Configuration.EventSourceSettings and Microsoft.Diagnostics.Tracing.EventSourceSettings, just as it says above.

You want the Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.Configuration.EventSourceSettings reference.

It works, produces flat file logs and writes to the Event Viewer, and when used in conjunction with a controller like PerfView, produces ETL files for detailed analysis.

Next, I'll be testing the out-of-process case.

Paula
  • 96
  • 6
0

@Benjol's detective work is correct.

Many users wanted to be able to use EventSource channels (which is included in the EventSource NuGet package) with SLAB so compatibility was improved to make compiling against the EventSource package at the time of release quite painless.

However, SLAB has not been updated recently but the EventSource Package continues to add/modify features. Some of these could be breaking changes with the current SLAB implementation. Since compatibility with subsequent releases of EventSource might not have been tested (I'm not sure what the team has done on this) there could be potential issues.

Randy supports Monica
  • 22,247
  • 4
  • 66
  • 92