I am trying to log exceptions in a better way where we can get human readable stack traces so I found out about this Ben.Demystifier library and it looks promising.
I added this nuget dependency in my application.
<PackageReference Include="Ben.Demystifier" Version="0.1.6" />
Now in my catch block if I do like this then it gives me compilation error -
catch (Exception ex)
{
Console.WriteLine(ex.Demystify());
}
Error I get -
> 'Exception' does not contain a definition for 'Demystify' and no
> accessible extension method 'Demystify' accepting a first argument of
> type 'Exception' could be found (are you missing a using directive or
> an assembly reference?)
Anything wrong I am doing here?