Upgrading from .NET Framework to .NET Core / .NET 5
In This Topic
Migrating References
Loupe uses a new family of libraries for .NET Standard and newer platforms that replaces the .NET Framework agents. To upgrade a project, remove references to the .NET Framework NuGet packages and replace them with the corresponding .NET Standard NuGet package.
Replace .NET Framework Package |
With This .NET Standard Package |
Gibraltar.Agent |
Loupe.Agent.Core |
Gibraltar.Agent.EntityFramework |
None - Entity Framework 6 is not yet supported. |
Gibraltar.Agent.Web |
None - ASP.NET WebForms is not available in .NET Core. |
Gibraltar.Agent.Web.Mvc |
None - ASP.NET MVC/Web API is replaced by ASP.NET Core. |
Gibraltar.Agent.NLog2 |
Loupe.Agent.NLog |
Gibraltar.Agent.NLog4 |
Loupe.Agent.NLog |
Gibraltar.Packager |
Loupe.Packager |
Loupe.Agent.Web.Module |
None - The capability is included in Loupe.Agent.AspNetCore. |
To align better with .NET Core & .NET 5, the .NET Standard / .NET Core line of agents is broken into more distinct packages for specific needs. This means that once you've added a reference to Loupe.Agent.Core you may want to add additional packages
.NET Standard Package |
Uses |
Loupe.Agent.AspNetCore |
Extends ASP.NET Core, adding metrics and request monitoring. |
Loupe.Agent.EntityFrameworkCore |
Extends EF Core to add metrics and request monitoring. |
Loupe.Agent.PerformanceCounters |
Adds performance counter recording for Windows applications |
Loupe.Agent.Core.Services |
Eases configuration tasks with Loupe and .NET Core. |
Migrating Configuration
In .NET Core applications configuration that was previously done in XML configuration files (app.config / web.config) is now typically done in JSON configuration files (appsettings.json). It is also common to use alternate configuration sources in .NET Core with built-in configuration providers for environment variables and more.
To migrate your Loupe configuration to JSON, add a Loupe property in JSON with the contents of your <gibraltar /> XML tag converted to JSON, like this:
Typical JSON Configuration |
Copy Code
|
{
"Loupe": {
"Publisher": {
"ProductName": "Loupe",
"ApplicationName": "ASP.NET Core 3 Sandbox",
"ApplicationType": "AspNet",
"ApplicationVersionNumber": "1.0.1"
},
"Server": {
"UseGibraltarService": true,
"SendAllApplications": true,
"CustomerName": "Your_Customer_Name"
},
"Performance": {
"EnableDiskMetrics": false,
"EnableNetworkMetrics": false
},
"NetworkViewer": {
"AllowRemoteClients": true
}
}
}
|
Each configuration section that used to be located within <gibraltar /> are now a JSON object with a property for each configuration element. For a complete set of configuration options, see Developer's Guide - Agent Configuration.
Migrating Application Startup
.NET Core / .NET 5 applications usually employ the HostBuilder pattern for defining startup configuration and controlling the application lifecycle (like startup and shut down). This changes the patterns used for configuration with code and providing application user information.
See Also