Add Web Reference instead of Service Reference in Visual Studio 2008

I’m just in the middle turning a 2-tier app into a 3-tier app (it was planned all along, so it’s been quite easy so gar). Anyway I added the service reference to my client project and wanted to reuse shared assemblies (which was a pain in the a** in ASP.net 2.0 Webservice – let me just say I had my set of batch scripts altering the generated proxy code). But in Windows Communication Foundation it’s really easy. When you add a reference just click on the ‘Advanced’ button and choose the options.

But that’s not actually what I wanted to blog about. Even with Visual Studio 2008 and .net 3.5 (3.0) I prefer to use old style Webservices sometimes but at the same time of course I don’t want to miss out on Linq etc. Until now I kept changing the target plattform to .net 2.0 to get my ‘Add Web Reference’ context menu item and then changing it back to .net 3.5. It works, but I kept grumbling why on earth they removed the option in VS08, well it turns out they didn’t remove it, the just moved it.

In the advanced dialog at the bottom you can add a web reference as before. (But it is still counter intuitive, why is adding an old style reference a suboption after picking a service reference? I would have preferred my context menu item.)

About these ads

12 thoughts on “Add Web Reference instead of Service Reference in Visual Studio 2008

  1. Thanks, I was wondering about this too… why when I create a Smart Device app, the web services folder was off to the side and I could just right-click and add, but for windows apps, the option was not there…

  2. Thanks, this helped me figure out what was going on when trying to have a web reference as a part of a library. You would think that this menu option would be more pronounced :|

  3. How do you get to the “Service Reference Settings” screen? I’m using VS2008 to build a console application and I’d like to add a web reference to the project.

  4. Thanks, I was wondering about this too… why when I create a Smart Device app, the web services folder was off to the side and I could just right-click and add, but for windows apps, the option was not there…

  5. Pingback: Add Web Reference instead of Service Reference in Visual Studio 2008 « Alex Duggleby’s Palace of Words | Mustafa Kipergil Hakkında Herşey…

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s