Setting up Rhino Servicebus with Rhinoqueues
I’m builiding a CQRS applicatation and would like to use Rhino ESB with Rhino Queues as transport channel. I start the backend using:
var host = new DefaultHost();
host.Start<EmptyBackendBootStrapper>();
and unexpectedly the application throws a HandlerException, with the message:
"Can't create component 'Rhino.ServiceBus.Impl.DefaultServiceBus' as it has dependencies to be satisfied."
'Rhino.ServiceBus.Impl.DefaultServiceBus' is waiting for the following dependencies:
- Service 'Rhino.ServiceBus.Internal.ITransport'
which was not registered.
- Service 'Rhino.ServiceBus.Internal.ISubscriptionStorage'
which was not registered.
What was the problem? I used NuGet to install the dependencies, but I forgot to add Rhino.ServiceBus.RhinoQueues, instead adding only the Rhino.Queues package. Solution is to install the Rhino.ServiceBus.RhinoQueues package :)
Also make sure you install the correct dependencies; for instance an newer version of Rhino.Queues might throw an error because it cannot load the required assembly version. Nuget should have added an assembly redirect, but if you don’t have it, you can tell NuGet to add binding redirects based on your packages:
Add-BindingRedirect -ProjectName IntegrationTests.AppServer
Footnotes
[1] | https://github.com/BjRo/LearningRhinoServiceBus |
Passing build properties to psake.cmd
I love psake and used Chocolatey’s cinst psake to make psake.cmd globally available on my system.
When I tried to do:
psake PackageSite -properties @{"configuration"="staging-standalone"}
I got the error message:
C:\Chocolatey\lib\psake.4.2.0.1\tools\psake.ps1 : Cannot process argument transformation on parameter 'properties'. Cannot convert the "System.Collections.Hashtable" value of type "System.String" to type "System.Collections.Hashtable".
To pass the string-formatted hashtable to Power Shell, use single quotes inside and double quotes around:
psake PackageSite -properties "@{'configuration'='staging-standalone'}"
Custom editor using Twitter.Bootstrap.Mvc4
Twitter.Bootstrap has tons of extensions that are available to anyone using Twitter.Bootstrap.Mvc4 [1]. As an example, here are the steps to add a date picker [2] to your Asp.Net Mvc4 app using Twitter.Bootstrap.Mvc4.