I have a solution which contains multiple WAPs (Web Application projects).
Every WAP has it's own Web Deploy project in order to be able to precompile these sites.
On one of the web app we are created a new WCF file with
Could not load file or assembly 'App_Web_*, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.
WCF stores the list of referenced assemblies into the customString
attribute in the build result (service.svc.cdcab7d2.compiled),
including App_Global. It seems there is an incorrect assumption here
that those assemblies will always be there, which is not necessarily
the case in Web Deployment Projects (aspnet_merge) where assemblies
will be merged. After the merge step, the assemblies are actually all
merged into a single assembly (let us say MyWebSite.dll) as we
selected that option in WDP. ASP.NET only updates the .compiled files
it knows about, so App_Global.asax.compiled actually has a correct
reference to MyWebSite_Deploy.dll instead of App_Global.dll. Original
assemblies are removed after the merge step. WCF reads the list of
assemblies previously stored, and throws when it cannot find
<compilation debug="false" batch="false">
<%@ ServiceHost ... Factory="SolutionName.SharedWeb.WadoLabsServiceHostFactory" %>
The following setup worked for me:
<%@ ServiceHost ... Service="<Namespace>.<ServiceContractClass>, <AssemblyName>" CodeBehind="ServiceContractClass.svc.vb" %>
The trick is to specify the qualified name, including the AsseblyName.(The assembly name that is specified in the project containing the service, not the Web Deploy Project).
Also note that there is a space between the comma after the class name, and the AssemblyName.