我们这里有一个应用程序,它使用 postsharp 将某些方法包装在从 MethodInterceptionAspect 派生的事务方面中。我们使用 NHibernate 2.0 作为应用程序的 ORM。此代码块中存在故障,
public override void OnInvoke(MethodInterceptionArgs args)
{
using (TransactionScope transaction = CreateTransactionScope())
{
args.Proceed();
transaction.Complete();
}
}
这会导致以下错误:System.BadImageFormatException:尝试加载格式不正确的程序。(来自 HRESULT 的异常:0x8007000B)这似乎只发生在调用保存而不是删除或获取调用的情况下。
我想知道是否有人遇到过类似的事情?