Dennis van der Stelt

The only way to win is to learn faster than anyone else

Community

Email Notifications

News

  • Addicted to Refactor! Pro

I read...

I Use...

Tags

Recent Posts

Archives

Blog Subscription Form

  • Email Notifications
    Go

"Add service reference" is disabled

In Visual Studio 2008 you can right-click a project and choose for "Add service reference" to create a proxy class for your web service. WCF preferred, of course.

But for some reason, the Visual Studio team disabled it when you're in debug mode. Something that used to work in Visual Studio 2005, so after starting a host, you could add the reference. In VS2008 this is disabled, or grayed out'.

The solution is to set your host as startup project, press CTRL-F5 so it'll be started without debugging and then you're able to choose to add the service reference.

Comments

Jeff said:

Thanks for the quick solution!

# March 28, 2008 9:33 PM

Tim said:

Thanks... quick and easy.

# April 11, 2008 5:37 PM

Sugath said:

use the following reference if ServiceMetadataBehavior is not worcking in vs 2008

using System.ServiceModel.Description;

# December 10, 2008 12:14 PM

Sai said:

Thanks dude... It works for me.

# January 29, 2009 7:11 PM

Jo said:

Thanks.....its really useful for the beginners..

# April 14, 2009 11:02 AM

Mike said:

This has been driving me crazy for hours!  Thanks for pointing that out.

# August 10, 2009 9:51 PM

Shyamal said:

Thanks Dennis fot the quick soluton

# October 30, 2009 5:01 AM

santosh said:

Thanks

# January 2, 2010 1:16 PM

Paul said:

Thanks for your help, appreciate it. On to the next problem :-)

# January 13, 2010 6:18 PM

Shree said:

Thanks very much !!

# February 17, 2010 8:15 AM

Jens said:

Great, I was going crazy over not being able to add the service reference. Thanks for the tutorial and this addition!

# April 27, 2010 2:56 PM

Dennis van der Stelt said:

Update : This post was updated and is much more explaining in this post, WCF Simple Example in Visual

# June 16, 2010 8:42 PM

Divya said:

In case of VS2005 I cant find the Add Service Reference option? How do we add it as reference?

# July 6, 2010 8:48 PM

Divya said:

Its working.. Thanks alot.. for this article...

# July 6, 2010 8:51 PM

Santosh said:

i think this is problem of the version missmatch in the OS.

# August 2, 2010 9:31 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 2 and 8 and type the answer here: