0

I'm attempting to tidy up some project references and have broken the WCFs because the .svc files don't appear to be compiled.

We have the .svc in a separate host project to the code, e.g. Calculator.svc contains:

<%@ ServiceHost Language="C#" Debug="true" Service="demo.Services.CalculatorServices.CalculatorSvc" %>

And in another project, say "ProjectB", we have CalculatorSvc.cs.

I removed the reference to "ProjectB" from the host project, as the tool I was using said it's not being used, and as the solution compiled I was happy. Unfortunately, I was mistaken.

Is it possible to perform compile time checks for this?

MattDuFeu
  • 1,615
  • 4
  • 16
  • 25

1 Answers1

0

I don't think there is. ASPX, SVC and the like use dynamic compilation, which means they will get compiled at run-time / first request.

For ASP.NET MVC you have the same problem when compiling views, and there is a solution, but I've never seen something like that for services or ASP.NET pages.

Community
  • 1
  • 1
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325