This project has moved and is read-only. For the latest updates, please go here.

Castle Windsor 2.5

Sep 6, 2010 at 11:07 AM
Edited Sep 8, 2010 at 3:52 PM

I've just downloaded Clay but have a project with references to v2.5 of Castle Windsor.  Upgrading the references within clay results in a depreciated method warning.  Regardless of whether you supress the method or not, the unit tests fail with a "Cannot perform runtime binding on a null reference" exception in the following code in "Intercept" of "InterfaceProxyBehavior":

           var invoker = BindInvoker(invocation);

The code that produces the design time warning is in "CreateInstance" of "DefaultClayActivator":

           //var proxyType = _builder.CreateClassProxy(baseType, options);

           var proxyType = _builder.CreateClassProxyType(baseType, null, options);

I'm still a complete beginner with Castle Windsor, just starting out with IoC so haven't even come across the Proxy stuff yet so no idea really what it's telling me or askng for.

Update: Question asked, with more details (screenshots / debug info) on StackOverflow

Nov 4, 2010 at 11:46 PM

Can you file a bug in the issue tracker?

Nov 9, 2010 at 4:08 PM

I created a workitem for this:

btw: nice project, really good advanced usage of the new C# 4 features!

Remco Ros

Nov 9, 2010 at 4:18 PM

I think I fixed it (see workitem). I pushed the changes to my fork:

Jan 21, 2011 at 7:30 PM


Oct 23, 2012 at 8:47 PM

As an FYI to anyone cloning this project in TortoiseHg, use: 


There are two packages available on clay and claysharp

Both packages failed at runtime during the initialization of a clay object due to a reference to an obsolete version of Castle.DynamicProxy2. Even after scouring for older versions of DynamicProxy and trying to make the references line up, I had no luck.

Perhaps the two packages available on Nuget could be consolidated in the Clay package and reference the fork that @remcoros has created? It would greatly reduce confusion for those that may simply rely on the package manager in VS to include Clay (or ClaySharp?)

Oct 24, 2012 at 2:02 PM

Old thread :-)

Does orchard still use old versions of Castle? ok...