Search code examples
c#visual-studiowsdlasmxservice-reference

Unable to access service reference


I have successfully added a service reference to my Visual Studio 2013 project.

I cannot however reference it in code.

For example, given the project name "myproject", and the service reference name "thirdpartyasmx", I cannot use this using directive...

using myproject.thirdpartyasmx

I cannot instantiate the class directly either...

thirdpartyasmx test = new thirdpartyasmx();

I have tried building the solution before trying to reference the service reference.

This is not something I do regularly, so I'm afraid I'm missing a step.


Solution

  • UPDATED based on OP feedback

    When you click on Add Service Reference, click on the Advanced button in the bottom left of the dialog box:

    enter image description here

    Clear the Reuse types in referenced assemblies checkbox (by default it's checked).

    enter image description here