Error: "overriding a method that is not visible from that assembly"

373 views
Skip to first unread message

tickzoom

unread,
May 22, 2009, 3:48:56 PM5/22/09
to Rhino.Mocks
RichnoMocks is giving the following error:

System.TypeLoadException : Method 'EngineIntervalOpen' on type
'ModelDriverProxy2ca54f55c643422f80ac083ffea60808' from assembly
'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null' is overriding a method that is not visible from
that assembly. - c:\Local\Engine\TickZoomUnitTest\TradingFramework
\TickSimulatorTest.cs:46

Assembly "A" has an internal class. Assembly "B" has the NUnit test
and mocks. Assembly A has:

[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2,
PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

What's happening here, please?

Wayne

Jonathon Rossi

unread,
May 23, 2009, 11:35:12 AM5/23/09
to Rhino...@googlegroups.com
I am pretty sure it is telling you the assembly containing the proxy is not strong named because your assembly is not.

This means you only need:
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
--
Jono
Reply all
Reply to author
Forward
0 new messages