DataCollection at the Global Level

If you are using the DataCollection API (either from native, by linking agains VSPerf.lib, or from managed, by importing Microsoft.VisualStudio.Profiler.dll), and wish to enable or disable collection at the global level, you must pass CurrentId for the elementId parameter:   using Microsoft.VisualStudio.Profiler;   [Not so interesting code here]     DataCollection.StartProfile(      ProfileLevel.Global,       DataCollection.CurrentId);   [Interesting…

3