exceptionless/Exceptionless.Net

Exceptionless.Windows vs Exceptionless.Wpf

mgnslndh opened this issue · 2 comments

I am a user of the Exceptionless.Wpf package. While looking at the source code for Exceptionless I stumbled upon ExceptionlessWindowsEnvironmentInfoCollector.cs. My app runs on Windows but I'm not seeing those process related properties in my exception reports. After some further investigation I understood that the Exceptionless.Windows package seems to be aimed at WinForms applications. The extension method ExceptionlessWindowsExtensions.Register wires up both WinForms exception handler and registers the ExceptionlessWindowsEnvironmentInfoCollector.

But I want those process handles, so I added the Exceptionless.Windows package but now I have a clash between the two Register extension methods. That can be solved, and I can register the collector with the resolver by hand.

So, all in all I have probably worked around the problem but it really seems like the Wpf package should have the Windows environment collector by default.

Maybe the packages should be split into:

  • Exceptionless.Windows
  • Exceptionless.WinForms or Exceptionless.Windows.WinForms
  • Exceptionless.Wpf or Exceptionless.Windows.Wpf

You should only need to use the Wpf client, code is shared between the clients. I'm trying to think if there is any reason we shouldn't be capturing that environment info in wpf. I can't think of any reason not to.. Would you mind submitting a pr to add a source link to that file in the wpf project and then adding a line to client.Configuration.Resolver.Register<IEnvironmentInfoCollector, ExceptionlessWindowsEnvironmentInfoCollector>(); in register.

No problem, I will do that.