Use object from DLL instead of WebProxy in amsx web service <p>I have a solution with two projects in VS2012. One is an old ASMX web service project and one is a DLL project called Utils.</p> <p>The Web Service project makes alot of use of the Utils project and the idea is that this DLL will also be shipped to clients because they will need functionality from it as well.</p> <p>So a <code>WebMethod</code> in the Web Service project looks like this:</p> <pre><code>using Utils; [WebMethod] [XmlType(Namespace = "http://url/invoice")] public void CheckInvoice(CToken token) { ... } </code></pre> <p>So in this example the Web Method <code>CheckInvoice</code> expects an instance of class <code>CToken</code>, which is in the <code>Utils</code> namespace.</p> <p>But when i generate the proxy class of the Web Service, then the exposed method <code>CheckInvoice</code> expects a <code>CToken</code> instance from the <code>ServiceProxy</code> namespace instead of the <code>Utils</code> namespace.</p> <p>But the clients also have the <code>Utils</code> DLL. So how can i force generation of the proxy to use the <code>CToken</code> class from the <code>Utils</code> namespace and not from the (default) ServiceProxy namespace?</p> <p>--</p> <p>When i add the <code>Service Reference</code> then i checked the <strong><em>Reuse types in referenced assemblies</em></strong> checkbox and also <strong><em>Reuse types in all referenced assemblies</em></strong>. But this doesn't make any difference. Maybe this only works for WCF web services? I'm looking for a solution for ASMX web services.</p> <p>Anyone any idea how to solve this problem?</p>