2016-07-25 38 views
0

只是一個香草NServiceBus 6.0.0-beta0004NServiceBus 6(6.0.0-beta0004) - 所請求的服務 'NServiceBus.RecoverabilityExecutorFactory' 尚未註冊

var endpointConfiguration = new EndpointConfiguration("endpoint"); 
endpointInstance = await Endpoint.Start(endpointConfiguration).ConfigureAwait(false); 

這將引發異常運行:

Bus.ProgramService An unhandled error has occurred. 
Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'NServiceBus.RecoverabilityExecutorFactory' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency. 
    at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) 
    at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) 
    at NServiceBus.AutofacObjectBuilder.Build(Type typeToBuild) in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\ObjectBuilder\Autofac\AutofacObjectBuilder.cs:line 39 
    at NServiceBus.CommonObjectBuilder.Build[T]() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\ObjectBuilder\Common\CommonObjectBuilder.cs:line 28 
    at NServiceBus.StartableEndpoint.CreateReceivers() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\StartableEndpoint.cs:line 93 
    at NServiceBus.StartableEndpoint.<Start>d__1.MoveNext() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\StartableEndpoint.cs:line 45 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 
    at NServiceBus.Endpoint.<Start>d__1.MoveNext() in D:\Code\GitHub\agupta-au\NServiceBus\src\NServiceBus.Core\Endpoint.cs:line 28 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 

我在想什麼?我的理解是,可恢復性的東西是關於第一級重試+第二級重試,但我還沒有設置。而且,似乎是這個傢伙已經進行討論:https://github.com/Particular/NServiceBus/pull/3828

任何幫助,將不勝感激:)

+0

您能分享您的配置代碼嗎? –

+0

NServiceBus Beta 004不應包含RecoverabilityExecutorFactory。我再次檢查,從nuget.org下載nuget包並反編譯。你能詳細說明你如何以及在哪裏得到這個版本? –

+0

呵呵,我用gitHub repo爲rel 6.0.0.0分支建了 – agAus

回答

1

由於丹尼爾在評論中已經提到,這個代碼不應該是可用的測試包的一部分。強烈建議堅持使用NuGet上的可用測試版包,因爲如果使用任何持久性/傳輸包,很可能會遇到問題。發行版6.0.0分支仍在積極開發中。

(但當然不應該發生異常;))

+0

謝謝,我現在用的是nuget。另一方面,如果我在使用beta4時使用Costura.Fody,我注意到了一個錯誤。這似乎是組裝掃描如何基於排除列表而不是列入列表的機制變化的結果 – agAus

+0

@agAus您可能想要在此處的官方Google組織報告您的問題:https:// groups .google.com/forum /#!forum/particularsoftware – Sabacc

+0

爲了完整起見,我已經轉而使用NUnit進行測試,而且我不再看到這個問題。只是等待產品出來測試版:) – agAus

相關問題