Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 4.46 KB

UPGRADING.md

File metadata and controls

92 lines (65 loc) · 4.46 KB

Upgrading

2.x to 3.x

If you are targeting .NET Framework, v3.0.0 contains binary breaking changes due to the introduction of strong name signing. You will need to re-compile your application against the new version. If you are referencing a library that also references Bugsnag you may also need to add a binding redirect or enable automatic binding redirection in your project file:

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

.NET Core and .NET 5/6 do not recognise strong names so there is no action required if targetting one of those.

1.x to 2.x

Our .NET notifier has gone through some major improvements, and there are some changes you'll need to make to get onto the new version.

MVC applications

We now have a dedicated Nuget package for ASP.NET MVC applications. In order to make sure that you have the new version you should uninstall the Bugsnag Nuget package and install the Bugsnag.AspNet.Mvc package.

The Bugsnag config section in your Web.config will need to be changed slightly.

 <configuration>
   <configSections>
-    <section name="bugsnagConfig" type="Bugsnag.ConfigurationStorage.ConfigSection, Bugsnag" />
+    <section name="bugsnag" type="Bugsnag.ConfigurationSection.Configuration, Bugsnag.ConfigurationSection" />
   </configSections>
-  <bugsnagConfig apiKey="your-api-key-goes-here" />
+  <bugsnag apiKey="your-api-key-goes-here" />
 </configuration>

Next you will need to remove the Bugsnag global filter, this is now included automatically if you are targeting at least .NET 4.0.

- filters.Add(WebMVCClient.ErrorHandler());

If you are targeting .NET 3.5 please follow the directions provided in the documentation to complete the upgrade.

Web API applications

We now have a dedicated Nuget package for ASP.NET Web API applications. In order to make sure that you have the new version you should uninstall the Bugsnag Nuget package and install the Bugsnag.AspNet.WebApi package.

The Bugsnag config section in your Web.config will need to be changed slightly.

 <configuration>
   <configSections>
-    <section name="bugsnagConfig" type="Bugsnag.ConfigurationStorage.ConfigSection, Bugsnag" />
+    <section name="bugsnag" type="Bugsnag.ConfigurationSection.Configuration, Bugsnag.ConfigurationSection" />
   </configSections>
-  <bugsnagConfig apiKey="your-api-key-goes-here" />
+  <bugsnag apiKey="your-api-key-goes-here" />
 </configuration>

Next you will need to remove the Bugsnag global filter, this is now included automatically if you are targeting at least .NET 4.0.

- filters.Add(WebAPIClient.ErrorHandler());

If you are targeting .NET 3.5 please follow the directions provided in the documentation to complete the upgrade.

WPF applications

The latest supported bugsnag-dotnet library for WPF applications is v1.4.0. Please refer to the Bugsnag WPF application docs for more details on how to install and configure Bugsnag in your WPF application.

Other applications

Update your Bugsnag Nuget package to version 2.0.0. If you are using an App.config to configure Bugsnag then you will also need to add the Bugsnag.ConfigurationSection package.

The Bugsnag config section in your App.config will need to be changed slightly.

 <configuration>
   <configSections>
-    <section name="bugsnagConfig" type="Bugsnag.ConfigurationStorage.ConfigSection, Bugsnag" />
+    <section name="bugsnag" type="Bugsnag.ConfigurationSection.Configuration, Bugsnag.ConfigurationSection" />
   </configSections>
-  <bugsnagConfig apiKey="your-api-key-goes-here" />
+  <bugsnag apiKey="your-api-key-goes-here" />
 </configuration>

You will then want to construct an instance of the Bugsnag client to use within your application.

+ var client = new Bugsnag.Client(Bugsnag.ConfigurationSection.Configuration.Settings);