Hi there,
The issue DYNPROXY-ISSUE-92 was just created by Mark (marcos).
Key: DYNPROXY-ISSUE-92
Summary: Proxy fails when creating a Proxy for certain Generic
signatures
Type: Bug
Importance: High
Description:
I am trying to stub IUnityContainer (for Microsoft's Unity IoC) using
Rhino Mocks but am getting a BadImageFormatException
With a bit of investigation I have found that it is this signature
that is causing the problem:
IUnityContainer RegisterType<TFrom, TTo>() where TTo : TFrom;
And I have isolated it to this test which doesn't require a reference
to Unity or RhinoMocks:
[TestClass]
public class UnitTest1
{
// Current implementation fails with:
// System.BadImageFormatException: An attempt was made to
load a program with an incorrect format. (Exception from HRESULT:
0x8007000B).
[TestMethod]
public void CreateInterfaceProxyWithoutTarget_GenericError()
{
Type type = typeof(ISomeInterface);
StandardInterceptor interceptor = new StandardInterceptor();
List<Type> types = new List<Type>();
object proxy =
new ProxyGenerator().CreateInterfaceProxyWithoutTarget
(type, new Type[] {}, interceptor);
}
}
public interface ISomeInterface
{
ISomeInterface RegisterType<TFrom, TTo>() where TTo : TFrom;
}
Thanks for looking at this!
Some more info on this thread:
http://groups.google.com/group/castle-project-users/browse_thread/thread/291499bdaf73071/64073c72d0b878e8
For more, see
http://support.castleproject.org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-92
--
donjon
by Castle Stronghold
http://www.castle-donjon.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---