Skip to content

.NET March 2022 Update - .NET 6.0.3, .NET 5.0.15, and .NET Core 3.1.23 #7259

Closed

Description

@dcwhittaker

Release Notes
6.0.3
5.0.15
3.1.23

Please report any issues you find either by responding to this issue, creating a new issue or creating a new issue in one of the following repos:

Distro 6.0.3 5.0.15 3.1.23
Ubuntu 18.04 ✅ ✅ ✅
Ubuntu 20.04 ✅ ✅ ✅
Ubuntu 21.04 ✅ ✅ ✅
Centos 7 ✅ ✅ ✅
Debian 10 ✅ ✅ ✅
Debian 11 ✅ ✅ ✅
Fedora 33 ✅ ✅ ✅
Fedora 34 ✅ ✅ ✅
OpenSUSE 15 ✅ ✅ ✅
Oracle ✅ ✅ ✅

Note: This list refers to the Microsoft-provisioned feeds (packages.microsoft.com) and does not in any way represent direct availability in distros (eg RHEL, Fedora).

Known Issues

If there are any more issues with this release we will track them here and check issues off as they're resolved. See the linked issues for details on progress and resolution details.

Activity

  1. pinned this issue on Mar 8, 2022
  2. frankyuan commented on Mar 9, 2022

    @frankyuan

    Hi team, after upgrading to 6.0.3(vs2022 17.1.1), I got an error Cannot access a disposed object. Object name: 'ConfigurationManager'. in var app = builder.Build();. May I know what change I should do to fix this issue? Thanks. I tried to downgrade to 6.0.2 by reinstalling vs2022 17.1.0 and it worked fine.

    at Microsoft.Extensions.Configuration.ReferenceCountedProviderManager.AddProvider(IConfigurationProvider provider)
    at Microsoft.Extensions.Configuration.ConfigurationManager.AddSource(IConfigurationSource source)
    at Microsoft.Extensions.Configuration.ConfigurationManager.Microsoft.Extensions.Configuration.IConfigurationBuilder.Add(IConfigurationSource source)
    at Microsoft.AspNetCore.Builder.WebApplicationBuilder.<>c__DisplayClass25_0.b__2(HostBuilderContext context, IServiceCollection services)
    at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
    at Microsoft.Extensions.Hosting.HostBuilder.Build()
    at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()

  3. philip-reed commented on Mar 9, 2022

    @philip-reed

    Also having the same issue as @frankyuan
    Not sure where the most appropriate place to log the issue is.

  4. philip-reed commented on Mar 9, 2022

    @philip-reed

    @frankyuan I don't suppose you are using Convey?
    My initial investigations are marking that as prime suspect in my app.

  5. bc3 commented on Mar 9, 2022

    @bc3

    Also having the same issue since 8/3/2022 on our build servers:

    OneTimeSetUp: System.ObjectDisposedException : Cannot access a disposed object.
    Object name: 'ConfigurationManager'.

    It is an integrationtest that is bootstrapping our api using the WebApplicationFactory class

    We do not use Convey or Scrutor like in dotnet/aspnetcore#40614

    Work-around:

    manualy removed the 6.0.201 sdk, and the 6.0.3 Aspnetcore.App & NetcoreApp from our build server
    set the dotnet version fixed to DotNetVersion: "6.0.103" in our yaml file instead of 6.0.x
    and our build is working again

  6. leecow commented on Mar 9, 2022

    @leecow
    Member

    @Pilchie @dougbu , can you take a look at the above reports?

    ah, Looks like Brennan has the repro worked out at dotnet/aspnetcore#40614 (comment)

  7. dougbu commented on Mar 10, 2022

    @dougbu
    Contributor

    Highlighting @BrennanConroy's workaround:

    You can likely workaround the issue by passing builder.Configuration to AddConvey()

    builder.Services.AddConvey(configuration: builder.Configuration);
  8. BrennanConroy commented on Mar 10, 2022

    @BrennanConroy
    Member

    That workaround is very specific to the Convey usage, not everyone who is hitting this issue is using Convey.

  9. frankyuan commented on Mar 10, 2022

    @frankyuan

    That workaround is very specific to the Convey usage, not everyone who is hitting this issue is using Convey.

    Agree, we don't use Convey but still run into this issue.

  10. Pilchie commented on Mar 10, 2022

    @Pilchie
    Member

    @rafikiassumani-msft can you take a look here?

  11. Pilchie commented on Mar 10, 2022

    @Pilchie
    Member
  12. BrennanConroy commented on Mar 10, 2022

    @BrennanConroy
    Member

    There is a change coming in 6.0.4 that fixes at least one case of this issue. If other folks like @frankyuan and @bc3 could provide minimal repro apps so we can make sure we cover everything that would be helpful.

    Let's continue the discussion at dotnet/aspnetcore#40614

  13. rafikiassumani-msft commented on Mar 10, 2022

    @rafikiassumani-msft

    @Pilchie after looking at the exception that's being thrown when adding Convey, it appears that ReferenceCountedProviderManager class was introduced in dotnet/runtime#63816 to fix the configurations locking issue. I suspect this might happen in other scenarios where configurations need to be synchronized. @bc3 can you provide a minimum repro with WebApplicationFactory ? - Assigning the following issue dotnet/aspnetcore#40614 to @halter73 for further investigation.

  14. philip-reed commented on Mar 10, 2022

    @philip-reed

    Highlighting @BrennanConroy's workaround:

    You can likely workaround the issue by passing builder.Configuration to AddConvey()

    builder.Services.AddConvey(configuration: builder.Configuration);

    Yes, this seems to work around the issue in my repro app.

  15. bc3 commented on Mar 11, 2022

    @bc3

    @rafikiassumani-msft , i finally got around to reproduce the bug. I got a solution with integration test ready for you to test the issue

    for us the issue was throw eventually by this code:

    services.AddApplicationInsightsKubernetesEnricher();

    it is an extension method from package: Microsoft.ApplicationInsights.Kubernetes from repo https://github.com/microsoft/ApplicationInsights-Kubernetes

    IssueDotnetCore603.zip

  16. BrennanConroy commented on Mar 11, 2022

    @BrennanConroy
    Member

    Looks like the Kubernetes issue was fixed back in August microsoft/ApplicationInsights-Kubernetes#237. Update your app to version 2.0.2 to fix it.

    And it's the same root cause as all the other repros on this thread. Building the service provider early and then disposing it.

  17. rafikiassumani-msft commented on Mar 11, 2022

    @rafikiassumani-msft

    I will lock conversations on this announcement. Let's continue the discussion at dotnet/aspnetcore#40614.

  18. locked and limited conversation to collaborators on Mar 11, 2022
  19. dcwhittaker commented on Apr 12, 2022

    @dcwhittaker
    ContributorAuthor

    Closed in favor of #7362

  20. unpinned this issue on Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions