Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alin Răuțoiu 27 posts 125 karma points
    Jul 04, 2022 @ 13:27
    Alin Răuțoiu
    0

    Error upgrading from Umbraco 10.0.0 to Umbraco 10.0.1

    After upgrading the NuGet package and trying to run the solution, it throws this error message in Program.cs.

    System.ArgumentNullException: 'Value cannot be null. (Parameter 'provider')
    
    This exception was originally thrown at this call stack:
    
    Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(System.IServiceProvider)
    Umbraco.Extensions.UmbracoBuilderExtensions.AddHostedServices.AnonymousMethod__4_0(System.IServiceProvider)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(Microsoft.Extensions.DependencyInjection.ServiceLookup.IEnumerableCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    ...
    [Call Stack Truncated]
    
  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 05, 2022 @ 15:10
    Huw Reddick
    0

    I'm getting this issue after upgrading to 10.0.1 as well

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 05, 2022 @ 15:29
    Huw Reddick
    102

    @Alin

    you need to add this line .ConfigureUmbracoDefaults() to your program.cs file like below

    public static IHostBuilder CreateHostBuilder(string[] args)
        => Host.CreateDefaultBuilder(args)
            .ConfigureUmbracoDefaults()
            .ConfigureLogging(x => x.ClearProviders())
            .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
    
  • Alin Răuțoiu 27 posts 125 karma points
    Jul 06, 2022 @ 21:58
    Alin Răuțoiu
    0

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft