Мой проект - это шина, которая использует NServiceBus.Недавно я начал получать ошибку всякий раз, когда я начинаю отладку в Visual Studio.Полная ошибка:
StateMachineException crossed an AppDomain boundary
Exception occurred in Topshelf.Internal.ServiceController`1[[NServiceBus.Hosting.Windows.WindowsHost, NServiceBus.Host, Version=6.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c]] during state Initial while handling OnStart
Я не знаю, если это проблема с NServiceBus или ... что.До сих пор я ничего не нашел, погуглив вокруг.
Внутреннее исключение показывает:
{Magnum.StateMachine.StateMachineException: Exception occurred in Topshelf.Internal.ServiceController`1[[NServiceBus.Hosting.Windows.WindowsHost, NServiceBus.Host, Version=6.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c]] during state Initial while handling OnStart ---> System.InvalidOperationException: No default connection string found in your config file (C:\develop\ironsolutions.bus\IRONSolutions.Bus.InventoryLoaderService\bin\Debug\IRONSolutions.Bus.InventoryLoaderService.dll.config) for the RabbitMQTransport Transport.
To run NServiceBus with RabbitMQTransport Transport you need to specify the database connectionstring.
Here is an example of what is required:
<connectionStrings>
<add name="NServiceBus/Transport" connectionString="host=localhost" />
</connectionStrings>
at NServiceBus.Transports.ConfigureTransport.Setup(FeatureConfigurationContext context) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Transports\ConfigureTransport.cs:line 45
at NServiceBus.Features.Feature.SetupFeature(FeatureConfigurationContext config) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\Feature.cs:line 203
at NServiceBus.Features.FeatureActivator.ActivateFeature(FeatureState featureState, IEnumerable`1 featuresToActivate, FeatureConfigurationContext context) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\FeatureActivator.cs:line 233
at NServiceBus.Features.FeatureActivator.SetupFeatures(FeatureConfigurationContext context) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\FeatureActivator.cs:line 116
at NServiceBus.Configure.Initialize() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Configure.cs:line 115
at NServiceBus.Bus.Create(BusConfiguration configuration) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Bus.cs:line 21
at NServiceBus.GenericHost.PerformConfiguration(Action`1 moreConfiguration) in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 121
at NServiceBus.GenericHost.Start() in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 68
at NServiceBus.Hosting.Windows.WindowsHost.Start() in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\WindowsHost.cs:line 30
at NServiceBus.Hosting.Windows.Program.<>c__DisplayClasse.<Main>b__6(WindowsHost service) in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\Program.cs:line 80
at Topshelf.Internal.ControllerDelegates`1.StartActionObject(Object obj) in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ControllerDelegates.cs:line 18
at Topshelf.Internal.IsolatedServiceControllerWrapper`1.<>c__DisplayClass2.<set_StartAction>b__1(TService service) in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\IsolatedServiceControllerWrapper.cs:line 65
at Topshelf.Internal.ServiceController`1.<.cctor>b__1(ServiceController`1 sc) in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ServiceController.cs:line 35
at Magnum.StateMachine.LambdaAction`1.Execute(T instance, Event event, Object parameter) in :line 0
at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object parameter) in :line 0
--- End of inner exception stack trace ---
at Magnum.StateMachine.ExceptionActionDictionary`1.HandleException(T stateMachine, Event event, Object parameter, Exception exception) in :line 0
at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event event, Object parameter) in :line 0
at Magnum.StateMachine.EventActionBase`1.Execute(T instance, Event event, Object parameter) in :line 0
at Magnum.StateMachine.State`1.RaiseEvent(T instance, BasicEvent`1 eevent, Object value) in :line 0
at Magnum.StateMachine.StateMachine`1.RaiseEvent(Event raised) in :line 0
at Topshelf.Internal.ServiceController`1.Start() in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ServiceController.cs:line 77
at Topshelf.Internal.IsolatedServiceControllerWrapper`1.Start() in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\IsolatedServiceControllerWrapper.cs:line 40
at Topshelf.Internal.ServiceControllerProxy.Start() in c:\Projects\TopShelfForNSB\src\Topshelf\Internal\ServiceControllerProxy.cs:line 47}
Это происходит после слияния, когда было изменено много файлов, поэтому трудно определить причину этого.