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

1 comment:

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