2016-07-25 105 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