Microsoft.AspNetCore.AzureAppServices.SiteExtension has a complicated build process that pulls in prior versions of itself for back compat. When the branding was updated for 5.0 it replaced the 3.0 versions rather than appending.
https://github.com/aspnet/AspNetCore/blame/ec8304ae85d5a94cf3cd5efc5f89b986bc4eafd2/src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj#L28
I'm not positive this is broken, just very suspicious.
We need to fix up the site extension all-up.
@BrennanConroy can you take a look at this now? We need to get the site extension back up and running for 3.0, 3.1 and future 5.0 builds.
What is the status of this? I cannot get the logging to blob storage to work. Currently using Microsoft.Extensions.Logging.AzureAppServices version 3.0.1 nuget, running .Net Core 3.0 and the extension ASP.NET Core Logging Integration version 3.1?
Same issue for me.
I'm running .Net Core 3.0, Framework Dependent build with ASP.NET Core Logging Integration 3.1.0 site extension installed and no logs are written to the blob despite having everything setup the same way as projects using .Net Core 2.x
Updated project and nugets to 3.1. Still no logs in blob storage.
Thank you for your persistence, we are aware of the issue and looking into fixing it and providing a new version of the extension.
@BrennanConroy any update?:)
This is blocking our update to 3.0/3.1 and 2.2 is reaching end of life/support 2019-12-23.
@emilssonn Can you clarify what specifically is blocked here? Is it just the logging to blob storage or are you seeing a crash or other failure? We are working to get an updated site extension out as soon as we can, but I want to make sure you're not seeing a crash or other failure when updating.
@anurse No crashes! Only the logging to blob storage. For us that is blocking because we log more data while in test/acc.
I have a workaround you can try, since all the Site Extension does is configure a special logging component (which is already on NuGet):
Add a package reference to Microsoft.AspNetCore.AzureAppServicesIntegration with the same major-minor version as ASP.NET Core (i.e. 3.0 or 3.1).
Call .UseAzureAppServices on your IWebHostBuilder. If you are using WebHost (i.e. you have a call to WebHost.CreateDefaultBuilder() in your Program.cs, then just add it to that:
WebHost.CreateDefaultBuilder(args)
.UseAzureAppServices(); // <-- Add this
If you are using generic host (recommended in 3.0+), then this goes in your ConfigureWebHostDefaults call:
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>()
.UseAzureAppServices(); // <-- Add this
});
To be clear, we're still working on fixing this, but this workaround should enable blob storage logging if that's critical to your migration and allow you to move off of 2.2 prior to EOL.
@anurse I can confirm that this workaround works!
When the fix for the extension itself is released, can I remove the nuget and UseAzureAppServices?
You can, though you may just want to leave it in place. It's exactly what the Site Extension does via ✨ magic ✨ (specifically, it configures a "Hosting Startup Assembly").
The site extension is nice because it provides a way to add this functionality without modifying your app, but you may find it useful to just leave it in place so you have direct control. Either way should be fine and it's up to you!
This was fixed in https://github.com/dotnet/aspnetcore/pull/18568 which will be released in 3.1.3.
Most helpful comment
@BrennanConroy any update?:)
This is blocking our update to 3.0/3.1 and 2.2 is reaching end of life/support 2019-12-23.