"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.

You may also like...

14 Responses

  1. Jeff says:

    Thanks for the quick solution!

  2. Tim says:

    Thanks… quick and easy.

  3. Sugath says:

    use the following reference if ServiceMetadataBehavior is not worcking in vs 2008
    using System.ServiceModel.Description;

  4. Sai says:

    Thanks dude… It works for me.

  5. Jo says:

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

  6. Mike says:

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

  7. Shyamal says:

    Thanks Dennis fot the quick soluton

  8. Paul says:

    Thanks for your help, appreciate it. On to the next problem 🙂

  9. Shree says:

    Thanks very much !!

  10. Jens says:

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

  11. Divya says:

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

  12. Divya says:

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

  13. Santosh says:

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

Leave a Reply

Your email address will not be published. Required fields are marked *