How do I add a .svc file in Visual Studio

Sachin Kainth picture Sachin Kainth · Aug 1, 2012 · Viewed 42.8k times · Source

I have a file with an .svc extension. First question is what is a .svc file? The second question is how do I create one of these from the Visual Studio add item menu? I've tried all the most obvious options but none of them create a .svc file.

Thanks,

Sachin

Answer

SpaceBison picture SpaceBison · Aug 1, 2012

In my experience, an SVC file is a WCF service - create a WCF application from the projects list and then do an "Add new item" and add a new WCF service.

For it to do anything it will need the appropriate bindings and endpoints configuring and wiring up - before it can be called.

See also: WCF service. Where to add . svc file