When I add a web service by using "add service reference" in the console app, the app.config does not generate the configuration. How do I generate this app.config with a specific wsdl? Thanks!
In Solution Explorer, right-click the project node, and then select Add > New Item. The Add New Item dialog box appears. Expand Installed > Visual C# Items. In the middle pane, select the Application Configuration File template.
In Solution Explorer, right-click the service reference and then click Update Service Reference. A progress dialog box displays while the reference is updated from its original location, and the service client is regenerated to reflect any changes in the metadata.
To access the Configure Service Reference dialog box, right-click a service reference in Solution Explorer and choose Configure Service Reference. You can also access the dialog box by clicking the Advanced button in the Add Service Reference Dialog Box.
When adding the service reference try clicking on the 'Advanced...' button and then uncheck the 'Reuse types in referenced assemblies' checkbox.
I found this out when I had created a simple project to test a third party service which all worked fine. Attempting to add the same reference to the main project resulted in the app.config and reference.vb file not being generated correctly.
I think this may have been because there were already other web references in the application or referenced applications, however unchecking 'Reuse types' resulted in the files being generated correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With