1

I written one WCF service after that i am trying to Publish(after Build) this service. But solution not showing Publish Option and also not creating any .svc file in the solution why?

Thanks in advance.

Regards,

Rajesh

Rajesh
  • 13
  • 3

1 Answers1

1

Did you create a WCF Service Library, or a Windows Service to which you then added a WCF Service class and scaffold?

If so, then this will explain it.

The Publish option only appears for web projects in VS - so that's either the Website or the Web Application Project. Also, .svc files are only required for services that are hosted in Asp.Net as a file extension is needed (before any rewrite rules) to 'activate' the service host.

Create a new Website Application.

Add a new WCF service to it (which should also add the .svc), and then update the dummy interfaces & stub class with your service code.

Andras Zoltan
  • 41,961
  • 13
  • 104
  • 160
  • I created WCF Service Library and How to create .Svc file is there any other way? – Rajesh Jun 01 '10 at 07:23
  • Thank u Andras Zoltan my problem is cleared.But what is diff b/w wcf class library and web projects wcfservice? – Rajesh Jun 01 '10 at 07:27
  • Hi Rajesh, please see http://stackoverflow.com/questions/2434906/wcf-service-library-vs-class-library-project-types - also if my answer helped you then accept it so it can go off the board :) – Andras Zoltan Jun 01 '10 at 08:01
  • How to accepct u ra answer?let me know i wil do that – Rajesh Jun 01 '10 at 08:17
  • @Rajesh - apologies if I sounded terse. This is your first SO question, so you're just getting to grips with it all. Welcome and hope you'll be asking many more, as well as hopefully answering a few! :) – Andras Zoltan Jun 01 '10 at 09:54