https://github.com/bugsnag/bugsnag-dotnet
.NET notifier for BugSnag. Error monitoring and error reporting for .NET.
https://github.com/bugsnag/bugsnag-dotnet
bugs bugsnag crash crash-reporting crash-reporting-tool debug debugging-tool error error-handling error-log error-monitoring error-reporting errors exception-handler exception-handling exception-reporting exceptions notifier platforms unhandled-exceptions
Last synced: 7 months ago
JSON representation
.NET notifier for BugSnag. Error monitoring and error reporting for .NET.
- Host: GitHub
- URL: https://github.com/bugsnag/bugsnag-dotnet
- Owner: bugsnag
- License: mit
- Created: 2014-10-22T19:58:02.000Z (over 11 years ago)
- Default Branch: next
- Last Pushed: 2025-07-17T10:54:35.000Z (8 months ago)
- Last Synced: 2025-08-01T00:31:17.123Z (7 months ago)
- Topics: bugs, bugsnag, crash, crash-reporting, crash-reporting-tool, debug, debugging-tool, error, error-handling, error-log, error-monitoring, error-reporting, errors, exception-handler, exception-handling, exception-reporting, exceptions, notifier, platforms, unhandled-exceptions
- Language: C#
- Homepage: https://docs.bugsnag.com/platforms/dotnet/
- Size: 3.35 MB
- Stars: 62
- Watchers: 36
- Forks: 31
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Security: SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
# Bugsnag Notifier for .NET
[](https://ci.appveyor.com/project/bugsnag/bugsnag-dotnet)
[](https://docs.bugsnag.com/platforms/dotnet/)
The Bugsnag Notifier for .NET gives you instant notification of exceptions
thrown from your .NET apps. Any uncaught exceptions will trigger a
notification to be sent to your Bugsnag project.
[Bugsnag](https://www.bugsnag.com) captures errors in real-time from your web,
mobile and desktop applications, helping you to understand and resolve them
as fast as possible. [Create a free account](https://www.bugsnag.com) to start
capturing exceptions from your applications.
Contents
--------
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Sending a Test Notification](#sending-a-test-notification)
- [Usage](#usage)
- [Catching and Reporting Exceptions](#catching-and-reporting-exceptions)
- [Sending Handled Exceptions](#sending-handled-exceptions)
- [Callbacks](#callbacks)
- [Demo Applications](#demo-applications)
- [Support](#support)
- [Contributing](#contributing)
- [License](#license)
- [Additional Documentation](https://docs.bugsnag.com/platforms/dotnet/)
- [Configuration](https://docs.bugsnag.com/platforms/dotnet/other/configuration-options/)
Getting Started
---------------
### Installation
#### Using Nuget (Recommended)
- Install the [Bugsnag](https://www.nuget.org/packages/Bugsnag/) package from Nuget.
#### Manual library reference
- Download the latest [Bugsnag.dll](https://github.com/bugsnag/bugsnag-dotnet/releases/latest) and reference it in your project
### Sending a Test Notification
```
var configuration = new Bugsnag.Configuration("{API_KEY}");
var client = new Bugsnag.Client(configuration);
client.Notify(new System.Exception("Error!"));
```
Usage
-----
### Catching and Reporting Exceptions
```
var configuration = new Bugsnag.Configuration("{API_KEY}");
var client = new Bugsnag.Client(configuration);
throw new System.Exception("Error!");
```
### Sending Handled Exceptions
```
var configuration = new Bugsnag.Configuration("{API_KEY}");
var client = new Bugsnag.Client(configuration);
try
{
throw new System.Exception("Error!");
}
catch (System.Exception ex)
{
client.Notify(ex);
}
```
### Callbacks
```
var configuration = new Bugsnag.Configuration("{API_KEY}");
var client = new Bugsnag.Client(configuration);
client.BeforeNotify((report) => {
report.Event.User = new Bugsnag.Payload.User {
Id = "1",
Name = "Testy McTest",
Email = "support@bugsnag.com" };
});
```
### Disabling Bugsnag in Debug Mode
```
var configuration = new Bugsnag.Configuration("{API_KEY}")
{
ReleaseStage = "development",
NotifyReleaseStages = new[] { "production" },
};
var client = new Bugsnag.Client(configuration);
try
{
throw new System.Exception("Error!");
}
catch (System.Exception ex)
{
client.Notify(ex);
}
```
Demo Applications
-----------------
[Demo applications which use the Bugsnag .NET library](examples/)
Support
-------
* [Additional Documentation](https://docs.bugsnag.com/platforms/dotnet/)
* [Search open and closed issues](https://github.com/bugsnag/bugsnag-dotnet/issues?utf8=✓&q=is%3Aissue) for similar problems
* [Report a bug or request a feature](https://github.com/bugsnag/bugsnag-dotnet/issues/new)
Contributing
------------
We'd love you to file issues and send pull requests. The [contributing guidelines](CONTRIBUTING.md) details the process of building and testing `bugsnag-dotnet`, as well as the pull request process. Feel free to comment on [existing issues](https://github.com/bugsnag/bugsnag-dotnet/issues) for clarification or starting points.
License
-------
The Bugsnag .NET notifier is free software released under the MIT License. See [LICENSE.txt](https://github.com/bugsnag/bugsnag-dotnet/blob/master/LICENSE.txt) for details.