I have a project which uses NHibernate.dll. We moved the project to use .Net Framework 4.0. We use FxCop and FxCop start failing and error appeared
Could not resolve assembly Nhibernate.dll so my guess was if i could move NHibernate.dll to move to .Net Framework 4.0 that would do the trick.
I tried and it gave like 100 errors about which ISet am i using is it System.** or Ies.Collections.Generic. I used Ies.Collection.Generic because Nhibernate has a reference to it.
I successfully managed to migrate it to .Net 4. but when I accessed my web application I got below message.
Inheritance security rules violated while overriding member: 'NHibernate.Cfg.Configuration.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
Although I am not overriding anything at all. I searched on internet and found couple of article but I do not want to change NHibernate code Because that is not my code.
Why am I not using latest NHibernate? because when I used this my project broke and the error was there is no overload method which uses 3 parameters (which my project uses) for
FilterDefinition(string name, string defaultCondition, IDictionary<string, IType> parameterTypes, bool useManyToOne);
Now they have 4th parameter which I am unsure what the results will be.
Question:
Could someone please help me with this error?
Has someone migrated NHibernate to .Net 4 successfully?
thanks
References:
http://forums.lhotka.net/forums/t/9914.aspx
Inheritance security rules violated while overriding member - SecurityRuleSet.Level2 http://community.codesmithtools.com/Template_Frameworks/f/67/p/12331/47618.aspx#47618