Loupe Support for .NET 5 Now Available

The Loupe Agents for .NET Standard & .NET Core have now been updated to also have .NET 5-specific versions. For developers upgrading their .NET Core applications from 3.1 to 5.0, just update your NuGet packages to any version 4.10 and later of the Loupe Agents and you’ll be all set.

What’s New with Loupe for .NET 5

Loupe’s agents have been updated and checked with ASP.NET Core 5 and Entity Framework Core 5. Additionally, the NuGet packages contain versions specific for .NET 5, minimizing the extra dependencies needed when building applications for .NET 5. But, the same agent stack still supports .NET Core 2.1, 3.1, and .NET Standard 2.0.

How to Upgrade from .NET Framework to .NET 5

The Loupe Agents for .NET 5 were designed to simplify upgrading from .NET Framework but also take advantage of .NET Core. The Loupe.Agent.Core NuGet package contains the API that matches the older Gibraltar.Agent API. It has the logging, sampled metric, and event metric features.

You’ll notice that keeping with the philosophy of .NET Core, .NET 5 tends to use many small assemblies instead of fewer large assemblies to help minimize the footprint of applications. Loupe follows this pattern, broken into a number of packages to minimize what is deployed in the minimal scenario. So, to keep the same functionality, you’ll want to add the Loupe.Agent.PerformanceCounters package to continue to record performance counters on Windows.

The change in how .NET Core uses configuration will be the biggest change you’ll observe in using Loupe - you’ll want to update to the new appsettings.json format. It’s JSON formatted and offers a lot of flexibility over the previous approach used in .NET Framework - not because of the switch to JSON but because it bakes in the ability to override configuration with environment variables and other mechanisms with no fuss on the part of the application.

The new configuration format tends towards brevity - no need to declare configuration sections, no need for the extra schematic content for XML. Of course, it also means fewer safeties and checks available to be sure you get the configuration right. Here’s an example configuration for a Loupe-enabled application:

{
  "Loupe": {
    "Publisher": {
      "ProductName": "Loupe",
      "ApplicationName": "Agent Test",
      "ApplicationType": "console",
      "ApplicationVersion": "2.1.0.0",
      "ApplicationDescription": "Console test application for .NET Core"
    },
    "Server": {
      "UseGibraltarService": true,
      "CustomerName": "Your_Customer_Name"
    }
  }
}

To see all of the options and common scenarios for application configuration in .NET 5, check out our documentation on Loupe Agent configuration.

What About WinForms & WPF?

.NET 5 brings the unification of .NET Framework and .NET Core. Along with that, WinForms and WPF applications can be upgraded to .NET 5 as well. While you don’t get cross-platform benefits for upgrading these applications, it does mean they can take advantage of the other advancements available in .NET Core.

For Loupe, since the .NET 5 agents are built on the .NET Core/.NET Standard agents, they currently don’t provide WinForms-specific features (like the built in log viewer and packager dialogs) that the .NET Framework Agent had. These capabilities will be coming in a future update.

Want to Use Loupe for Your .NET 5 Project?

Not a current Loupe user, but looking for an advanced logging system for your .NET 5 applications? Learn more on how Loupe integrates with the following .NET 5 technologies.

Rock solid centralized logging

Unlimited applications, unlimited errors, scalable from solo startup to enterprise.