How to debug nHibernate/RhinoMocks TypeInitializer exception

Posted by Joe Future on Stack Overflow See other posts from Stack Overflow or by Joe Future
Published on 2009-04-22T02:35:29Z Indexed on 2010/03/13 20:05 UTC
Read the original article Hit count: 762

Filed under:

Pulling my hair out trying to debug this one. Earlier this morning, this code was working fine, and I can't see what I've changed to break it. Now, whenever I try to open an nHibernate session, I'm getting the following error:

Test method BCMS.Tests.Repositories.BlogBlogRepositoryTests.can_get_recent_blog_posts threw exception: System.TypeInitializationException: The type initializer for 'NHibernate.Cfg.Environment' threw an exception. ---> System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Castle.DynamicProxy.Serialization.ProxyObjectReference,Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f'..

Any thoughts on how to debug what's going on here?

© Stack Overflow or respective owner

Related posts about nhibernate