Bugsnag 4.0.0

Prefix Reserved
dotnet add package Bugsnag --version 4.0.0                
NuGet\Install-Package Bugsnag -Version 4.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bugsnag" Version="4.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bugsnag --version 4.0.0                
#r "nuget: Bugsnag, 4.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bugsnag as a Cake Addin
#addin nuget:?package=Bugsnag&version=4.0.0

// Install Bugsnag as a Cake Tool
#tool nuget:?package=Bugsnag&version=4.0.0                

Bugsnag Notifier for .NET

build status Documentation

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 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 to start capturing exceptions from your applications.

Contents

Getting Started

Installation

  • Install the Bugsnag package from Nuget.
Manual library reference
  • Download the latest Bugsnag.dll 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

Support

Contributing

We'd love you to file issues and send pull requests. The contributing guidelines details the process of building and testing bugsnag-dotnet, as well as the pull request process. Feel free to comment on existing issues for clarification or starting points.

License

The Bugsnag .NET notifier is free software released under the MIT License. See LICENSE.txt for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages (16)

Showing the top 5 NuGet packages that depend on Bugsnag:

Package Downloads
Apprio.Enablement.Telemetry.Exceptions

Package Description

Bugsnag.AspNet.Core

The Bugsnag Notifier for ASP.NET Core gives you instant notification of exceptions thrown from your ASP.NET Core applications. Any uncaught exceptions will trigger a notification to be sent to your Bugsnag project.

Apprio.Enablement.Infrastructure.Abstractions

Package Description

Bugsnag.ConfigurationSection

The Bugsnag .NET configuration library is used to configure your Bugsnag integration using a Web.config or App.config

Apprio.Enablement.Infrastructure.Extensions

Package Description

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Bugsnag:

Repository Stars
File-New-Project/EarTrumpet
EarTrumpet - Volume Control for Windows
ErsatzTV/ErsatzTV
Stream custom live channels using your own media
mbos/Pass4Win
Windows version of Pass (http://www.passwordstore.org/)
Version Downloads Last updated
4.0.0 180 3/27/2025
3.1.0 1,612,305 6/15/2022
3.0.1 540,260 3/24/2022
3.0.0 621,195 1/31/2022
2.2.3 1,133,556 9/6/2021
2.2.3-alpha.1 200 9/6/2021
2.2.2 589,106 3/18/2021
2.2.1 617,338 5/14/2020
2.2.0 1,008,317 7/19/2018
2.1.0 3,748,111 5/31/2018
2.0.2 56,366 3/29/2018
2.0.1 1,602 3/28/2018
2.0.0 2,460 3/26/2018
2.0.0-alpha 1,653 3/12/2018
1.4.0 76,555 10/2/2017
1.3.0 118,378 9/21/2016
1.2.0 71,026 4/15/2015
1.1.0.2 2,295 4/3/2015
1.0.0 3,656 12/21/2014