Using Windsor 3.1 in VS2012. I have a master installer class that registers all my service dependencies. One of the required dependencies is not used/needed in the particular solution so I attempted to stub it and register the stub (Rhinomocks) like so:
IRasterImageService fakeRasterSvc = MockRepository.GenerateStub<IRasterImageService>();
container.Kernel.AddComponentInstance<IRasterImageService>(fakeRasterSvc);
This results in the following error:
"IRasterImageService could not be registered. There is already a component with that name. Did you want to modify the existing component instead? If not, make sure you specify a unique name."
The odd thing is that nowhere else is this component registered. I can comment out that code and get an error saying that IRasterImageService was not registered.
What am I doing wrong?