Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding .svc file missing

Tags:

wcf

I need to add a .svc file to WCF Service Library I have added to a solution (This doesn't have the .svc file). If I specify this file through ad new item (eg test.svc), this is an installer file not the WCF file.

How can I add this file to my project?

Thanks

like image 965
GurdeepS Avatar asked Sep 01 '25 17:09

GurdeepS


1 Answers

You cannot add a .svc file to a WCF service library - you need to add the WCF service file to a ASP.NET web site or ASP.NET web application in your solution.

In a web application or web site, you can right click on the project, choose "Add New Item", and then pick "WCF Service" from the dialog. This will add the necessary .svc file to your web site or web app.

The svc file must to be in a web app/web site as a container - it cannot reside in a WCF service library.

Marc

like image 85
marc_s Avatar answered Sep 04 '25 11:09

marc_s