exceptionless / Exceptionless.Net

Exceptionless clients for the .NET platform
https://exceptionless.com
Other
557 stars 142 forks source link

Updating from v4.6.2 to v4.7.0 or newer causes conflicts with Ben.Demystifier #281

Closed mlaboss-rsb closed 2 years ago

mlaboss-rsb commented 2 years ago

In our project we were using Exceptionless v4.6.2. I just tried updating to the latest nuget package, and started getting errors becsuse the ToStringDemystified function was inaccessible.

'Exception' does not contain a definition for 'ToStringDemystified' and no accessible extension method 'ToStringDemystified' accepting a first argument of type 'Exception' could be found (are you missing a using directive or an assembly reference?)

We use ToStringDemystified in various places throughout our code for logging errors. We also use EnhancedStackTrace in a few places.

The problem is that now, as of v4.7.0, ExceptionExtensions, which contains ToStringDemystified, is declared internal in Exceptionless (see https://github.com/exceptionless/Exceptionless.Net/pull/266/files), but EnhancedStackTrace is still public.

So, if I use Exceptionless v4.7.0 or newer, I can no longer access ToStringDemystified, but if I add the Ben.Demystifier nuget package, then I get error code CS0433 stating:

The type 'EnhancedStackTrace' exists in both 'Ben.Demystifier, Version=0.4.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a' and 'Exceptionless, Version=4.0.0.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747'

niemyjski commented 2 years ago

Thanks for reporting this, we probably should internalize this. would you mind submitting a pr?