<p>I have a WCF service that I have to reference from a .net 2.0 project.</p>

<p>I have tried to reference it using the "<strong>add web reference</strong>" method but it messes up the params.  </p>

<p>For example, I have a method in the service that expects a <code>char[]</code> to be passed in, but when I add the web reference, the method expects an <code>int[]</code>.</p>

<p>So then I tried to setup <strong>svcutil</strong> and it worked... kind of.<br>
I could only get the service class to compile by adding a bunch of <em>.net 3.0</em> references to my <em>.net 2.0</em> project. This didn't sit well with the architect so I've had to can it (and probably for the best too).</p>

<p>So I was wondering if anyone has any pointers or resources on how I can setup a <em>.net 2.0</em> project to reference a <strong>WCF service</strong>.</p>

[{'answer_id': 9531, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': True, 'text': '<p>One of those instances that you need to edit the WSDL.  For a start a useful tool</p>\n\n<p><a href="http://codeplex.com/storm" rel="nofollow noreferrer">http://codeplex.com/storm</a></p>\n'}, {'answer_id': 9641, 'author': 'lomaxx', 'author_id': 493, 'author_profile': 'https://Stackoverflow.com/users/493', 'pm_score': 0, 'selected': False, 'text': "<p>Thanks for the resource. It certainly helped me test out the webservice, but it didn't much help with using the WCF service in my .net 2.0 application.</p>\n\n<p>What I eventually ended up doing was going back to the architects and explaining that the 3.0 dll's that I needed to reference got compiled back to run on the 2.0 CLR. We don't necessarily like the solution, but we're going to go with it for now as there doesn't seem to be too many viable alternatives</p>\n"}, {'answer_id': 19696, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>What binding are you using - I think if you stick to the basicHttp binding you should be able to generate a proxy using the "add web reference" approach from a .net 2 project?</p>\n\n<p>Perhaps if you post the contract/interface definition it might help?</p>\n\n<p>Cheers\nRichard</p>\n'}, {'answer_id': 31472, 'author': 'lomaxx', 'author_id': 493, 'author_profile': 'https://Stackoverflow.com/users/493', 'pm_score': 0, 'selected': False, 'text': "<p>I was using the basicHttp binding but the problem was actually with the XMLSerializer. It doesn't properly recognize the wsdl generated by WCF (even with basicHttp bindings) for anything other than basic value types.</p>\n\n<p>We got around this by added the reference to the 3.0 dll's and using the datacontract serializer.</p>\n"}]
['https://Stackoverflow.com/questions/9472', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/493/']