Friday, November 21, 2008

Rhino Mock and "Type is not public, so a proxy cannot be generated"

When you try to create mock object using rhino mocks and object should implement internal interface you may get following error:
Type is not public, so a proxy cannot be generated
In order to fix it, put following line in interface assembly:

[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]

More information at: link


hajikhatri said...

Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us. free vpn

Anonymous said...

Las Vegas' Wynn Casino - JTM Hub
Casino. Wynn is a $4 billion resort with four hotel towers with 5,750 rooms and suites. Each of the hotel 바카라사이트 towers includes a apr casino 20,000 square foot casino and a