SlimReaderWriterLock missing from Castle.Core

113 views
Skip to first unread message

DanielT

unread,
Apr 19, 2010, 5:35:40 PM4/19/10
to Castle Project Users
I have an entity that I'm using [ActiveRecord(Lazy=true)] on. However,
when I try to run my program, I get the following exception:

"The type initializer for 'NHibernate.ByteCode.Castle.ProxyFactory'
threw an exception.

Could not load type 'Castle.Core.Internal.SlimReaderWriterLock' from
assembly 'Castle.Core, Version=1.2.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc'."

Looking in the Castle.Core.Internal namespace, it looks like
SlimReaderWriterLock is missing. This is using AR 2.1.2 bin release.
Does anyone know why this class is missing, and how I can fix this
problem? Thanks.

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.

Krzysztof Koźmic

unread,
Apr 20, 2010, 2:09:45 AM4/20/10
to castle-pro...@googlegroups.com
Well, the type is called SlimReadWriteLock. I think you have some older
version of Core.
I just did a check with binaries for AR 2.1.2 and it worked as expected:

try
{
var factory = new
ProxyFactoryFactory().BuildProxyFactory();
Console.WriteLine("tada!");
}
catch (Exception e)
{
Console.WriteLine(e);
}

can you check if this code fails for you?

DanielT

unread,
Apr 20, 2010, 5:16:56 PM4/20/10
to Castle Project Users
Aha, found the source of the problem. Turns out my copy of
NHibernate.Bytecode.Castle.dll was out of date. I was using the one
that came with Fluent NHibernate and it's apparently an older version
than what AR 2.1.2 uses.


On Apr 19, 8:09 pm, Krzysztof Koźmic <krzysztof.koz...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages