Add a web reference to a project but make the auto-generated proxy classes internal (i.e. not public)
问题 I'm building a class library that uses a web reference in its data access layer, but much to my dismay, there doesn't seem to be an acceptable way to set the access for the auto-generated proxy classes. By default, they're public , but I don't want to expose the proxy classes outside the library. I've found this on MSDN, but all the answers indicate manually altering the proxy classes to set the access modifiers. Not surprisingly, the proxy classes all have this at the top: //----------------