danielgary / xmlrpcnet

Automatically exported from code.google.com/p/xmlrpcnet
0 stars 0 forks source link

Add ability to specify assembly name of generated proxy assembly #101

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I attempted to use a non-public interface as the basis for one of XML RPC proxy 
classes, but this fails when the application is run with the following error:

Type 'XmlRpcProxyb8578157-e568-4045-8a60-b3be53b29d3a' from assembly 
'XmlRpcProxyb8578157-e568-4045-8a60-b3be53b29d3a, Version=0.0.0.0, 
Culture=neutral, PublicKeyToken=null' is attempting to implement an 
inaccessible interface.

This particular error can be solved by adding an InternalsVisibleTo("IMyProxy") 
attribute to the assembly which generates the proxies, but currently there is 
no means of indicating to XML-RPC.NET the name of the generated assembly to 
match it up with the "InternalsVisibleTo" attribute.

The attached patch is one I knocked up (against 2.5.0) to allow me to apply an 
attribute to the proxy interface which specifies the name that should be given 
to the generated assembly for that interface. I can then use the same name an 
"InternalsVisibleTo" attribute applied to the containing assembly to allow me 
to generate proxies for non-public interfaces.

Original issue reported on code.google.com by lee.mill...@gmail.com on 12 Feb 2012 at 12:42

Attachments:

GoogleCodeExporter commented 8 years ago
Accessing the control from a WinForm app works fine. Do it from a console app 
and you get this error. Not sure why - about to Google it...

Original comment by dtpe...@gmail.com on 21 Jan 2013 at 8:16