2017-01-20 4 views
0

C#ASP.NETアプリケーションでリリースモードでNhibernate 4.1.0からこのエラーが発生しました。 .NET 4.5.1に:「NHibernate 4.1.0を使用して、メンバ 'Antlr.Runtime.RecognitionException.GetObjectData ...」をオーバーライドしている間に継承セキュリティルールが違反しました。

Inheritance security rules violated while overriding member: 'Antlr.Runtime.RecognitionException.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. 

ビーイングAntl3含まdllの私が何であるかを把握することはできません問題

答えて

0

このstackoverflow postは正しい方向に私を指摘しました。

GetObjectDataにSecurityCriticalAttributeが設定されているAntl3バージョンが必要でしたが、明らかにNHibernate 4.1.0ソースに付属していたバージョンではありませんでしたので、Ant3ソースをhereから取得し、Antl3.Runtime.net40- 、だから私はそれBultのき

 [SecurityCritical] 
    public override void GetObjectData(SerializationInfo info, StreamingContext context) 
    { 

NHibernateの-4.1.0.GA-SRC \ libに\ネットフォルダやら出来上がり、これで、アプリケーションの実行中に生成DLLを置き換える:それは正しかったクライアントと見てきましたfine

関連する問題