I was working on a demo for a customer and needed to use ASMX web services. I crufted up my sample application, right-clicked the project node in the Solution Explorer pane, and saw that there is no “Add Web Reference” menu item there anymore. Strange. Then I went to the Project menu item and was going to select it from there, but it was grayed out. Wha?!? OK, I know I can use wsdl.exe to generate ASMX assets, but that doesn’t answer why it was grayed out and I can’t use ASMX anymore.
Turns out that you can still easily generate ASMX web references using Visual Studio 2008. Right-click the project node in the Solution Explorer pane (or click the Project menu item) and choose “Add Service Reference…” You will get the Add Service Reference dialog. Click the Advanced button at the bottom left.
The next screen that appears is the Service Reference Settings dialog. This is where you can easily enable your WCF client for asynchronous method invocation. You can control message contract generation, and type reuse settings as well. There’s also a button at the bottom left that says “Add Web Reference”.
Click that button, and you get the familiar dialog that lets you generate ASMX proxies.