views:

318

answers:

1

Doesn't produce a app.config . In my team there is a guy who has Visual Studio 2008, he created a webservice.

Then there is me, adding this webservice to a console project.

Adding the service reference goes without problems but no valid app.config is generated. It's just empty

<configuration>
</configuration>

When I disable 'reuse types' in my service reference it works but then I get an ambiguous error.

Is this a bug?

I found http://stackoverflow.com/questions/2159107/visual-studio-does-not-generate-app-config-content-when-add-service-reference this one, but there is no solution there, so I thought I bump the problem up again.

Thanks

+1  A: 

I have experienced the same issue with Visual Studio 2008. I find I get different results if I'm using the "Add Service Reference..." command, or digging deeper to "Add Service Reference..." | "Advanced..." | "Add Web Reference...".

However, the tried-and-true method--and the solution that worked for me--is still via the command line:

svcutil.exe /language:cs /out:GeneratedProxy.cs /config:app.config http://server/path_to/WebServiceBean?WSDL

That should give you a working app.config. Hope that helps!

ewall