Upgrading from 8.0.2 to 8.1.0 - Boot Failed (Unable to resolve type)
Hi everyone,
I'm upgrading 8.0.2 to 8.1.0.
Everything was done using the generic upgrade guide and the version specific upgrade notes.
When I'm trying to run upgraded project I have a weird boot failed error.
Do you have any idea what could be wrong with that?
{
"@t": "2020-11-06T03:29:54.3603329Z",
"@mt": "{FailMessage} ({Duration}ms) [Timing {TimingId}]",
"@l": "Error",
"@x": "Umbraco.Core.Exceptions.BootFailedException: Boot failed. ---> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: ---> System.InvalidOperationException: Unable to resolve type: Ts.Web.Core.Components.TenderPageEventsComponent, service name: ---> System.InvalidOperationException: Unresolved dependency [Target Type: Ts.Web.Core.Components.TenderPageEventsComponent], [Parameter: titleSearchReportNotificationRepo(Ts.Web.Core.Repository.ITitleSearchReportNotificationRepo)], [Requested dependency: ServiceType:Ts.Web.Core.Repository.ITitleSearchReportNotificationRepo, ServiceName:]\r\n at LightInject.ServiceContainer.GetEmitMethodForDependency(Dependency dependency) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4207\r\n at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4154\r\n at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action`1 decoratorTargetEmitter) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4120\r\n at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action`1 decoratorTargetEmitMethod) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4081\r\n at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4038\r\n at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 3856\r\n at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 3777\r\n at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4743\r\n --- End of inner exception stack trace ---\r\n at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4748\r\n at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4705\r\n at LightInject.ServiceContainer.GetInstance(Type serviceType) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 3437\r\n at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) in d:\\a\\1\\s\\src\\Umbraco.Core\\Composing\\ComponentCollectionBuilder.cs:line 33\r\n at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) in d:\\a\\1\\s\\src\\Umbraco.Core\\Composing\\ComponentCollectionBuilder.cs:line 25\r\n at Umbraco.Core.Composing.CollectionBuilderBase`3.CreateCollection(IFactory factory) in d:\\a\\1\\s\\src\\Umbraco.Core\\Composing\\CollectionBuilderBase.cs:line 117\r\n at LightInject.PerContainerLifetime.GetInstance(Func`1 createInstance, Scope scope) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 6169\r\n at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4656\r\n at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 3856\r\n at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 3777\r\n at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4743\r\n --- End of inner exception stack trace ---\r\n at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4748\r\n at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 4705\r\n at LightInject.ServiceContainer.GetInstance(Type serviceType) in C:\\projects\\lightinject\\src\\LightInject\\LightInject.cs:line 3437\r\n at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) in d:\\a\\1\\s\\src\\Umbraco.Core\\FactoryExtensions.cs:line 22\r\n at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in d:\\a\\1\\s\\src\\Umbraco.Core\\Runtime\\CoreRuntime.cs:line 158\r\n --- End of inner exception stack trace ---",
"FailMessage": "Boot failed.",
"Duration": 2214,
"TimingId": "eed1ab4",
"SourceContext": "Umbraco.Core.Runtime.CoreRuntime",
"ProcessId": 10104,
"ProcessName": "w3wp",
"ThreadId": 1,
"AppDomainId": 6,
"AppDomainAppId": "LMW3SVC5ROOT",
"MachineName": "DESKTOP-87D4FPS",
"Log4NetLevel": "ERROR",
"HttpRequestNumber": 1,
"HttpRequestId": "35515eda-e582-43d4-b282-717579e9e189"
}
Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: --->
System.InvalidOperationException: Unable to resolve type: Ts.Web.Core.Components.TenderPageEventsComponent, service name: --->
System.InvalidOperationException: Unresolved dependency [Target Type: Ts.Web.Core.Components.TenderPageEventsComponent], [Parameter: titleSearchReportNotificationRepo(Ts.Web.Core.Repository.ITitleSearchReportNotificationRepo)], [Requested dependency: ServiceType:Ts.Web.Core.Repository.ITitleSearchReportNotificationRepo, ServiceName:]
This is most likely caused by a service not being registered. Could you try to remove any usage of the mentioned dependencies, and see if that can get umbraco to boot? :)
It seems like it doesn't register any of the dependencies.
I have it registered using IUserComposer in compose method and it works fine in 8.0.2 but in 8.1.0.
If I disable all DI registration my site won't load :(
Upgrading from 8.0.2 to 8.1.0 - Boot Failed (Unable to resolve type)
Hi everyone,
I'm upgrading 8.0.2 to 8.1.0. Everything was done using the generic upgrade guide and the version specific upgrade notes. When I'm trying to run upgraded project I have a weird boot failed error. Do you have any idea what could be wrong with that?
Hi,
The error states that:
Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: ---> System.InvalidOperationException: Unable to resolve type: Ts.Web.Core.Components.TenderPageEventsComponent, service name: ---> System.InvalidOperationException: Unresolved dependency [Target Type: Ts.Web.Core.Components.TenderPageEventsComponent], [Parameter: titleSearchReportNotificationRepo(Ts.Web.Core.Repository.ITitleSearchReportNotificationRepo)], [Requested dependency: ServiceType:Ts.Web.Core.Repository.ITitleSearchReportNotificationRepo, ServiceName:]
This is most likely caused by a service not being registered. Could you try to remove any usage of the mentioned dependencies, and see if that can get umbraco to boot? :)
HTH :)
It seems like it doesn't register any of the dependencies. I have it registered using IUserComposer in compose method and it works fine in 8.0.2 but in 8.1.0.
If I disable all DI registration my site won't load :(
Thanks, Alexander.
how did you register your services? :)
is working on a reply...