I have seen the steps for javascript, java projects.I tried many ways to set up sentry for dot net,but no luck.can anyone help me with this.Thanks in advance
2 Answers
The answer from @hmiedema9 is spot on: The current Sentry client for .NET is SharpRaven and it can be installed using the NuGet package.
Besides that, Sentry is working on unifying the API across all SDKs. That means the way you use you the JavaScript SDK will be the same as the .NET or any other with a few idiomatic differences.
A forum topic was created yesterday to introduce the concept.
The new .NET SDK which is still in preview can be used with the following API:
using (SentrySdk.Init("your DSN"))
{
// App code
SentrySdk.CaptureException(error);
}
Unhandled errors are automatically captured by the SDK but like in the example above you can send events manually using CaptureException
and other methods.
PS I'm a .NET developer at Sentry and we discuss the new SDK on Gitter if you have any questions.

- 6,029
- 3
- 25
- 38
-
It is weird their code doesn't work on my console app .net 4.8 but SharpRaven (which is deprecated) works... I believe there is something wrong with Newtonsoft.Json – HasanG Jan 02 '20 at 13:12
-
Please file an issue on GitHub: https://github.com/getsentry/sentry-dotnet – Bruno Garcia Jan 02 '20 at 14:15
-
Sentry's site seems to have quite a bit of documentation on their website. Have you tried anything from there yet?
https://sentry.io/for/dot-net/
Seems like getting started should only require installing this package:
Install-Package SharpRaven
Then instantiating in your code:
var ravenClient = new RavenClient("your dsn")
Full .NET documentation can be found here

- 948
- 4
- 17