C++ and Dispose method

Description

Our company try to use NHibernate 2.0 for products. We have some classes on manged C++ and mapped them. Everything worked fine till yesterday, when I downloaded last changes in sources. When I tried to start my application, I have the exception from NHibernate:
"The following types may not be used as proxies: Class1: method Dispose should be virtual Class2: method Dispose should be virtual".
When I tried to debug NHibernate sources, I saw in ProxyTypeValidator.cs in CheckMethodIsVirtual method the next validation:
if (!method.IsVirtual || method.IsFinal)
{
Error(errors, type, "method " + method.Name + " should be virtual");
}.

For Dispose() method we have method.IsFinal is true, becouse we cann't create it explicitly. For the C++/CLI case the compiler creates method imlicitly as
public sealed override void Dispose()

As result we cann't now to proceed develop our application and test NHibernate.

Environment

None

Activity

Show:

Fabio Maulo 
August 23, 2008 at 5:51 AM

Too late.
We will fix it in NH2.0.0SP1 (coming soon after NH2.0.0GA ~20days)
BTW you can comment the line in your NH copy if you want start to use NH2.0.0 now.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created August 22, 2008 at 4:26 AM
Updated September 3, 2008 at 1:57 PM
Resolved September 3, 2008 at 1:57 PM
Who's Looking?