I have a solution with many WCF Web service references in a WPF app that all of a sudden has begun to fail while Updating the Service. I have reviewed the bindings and have checked and unchecked the "Reuse Types" in the configuration. If I uncheck this box, all of my data class types go unresolved but the Reference.cs gets build. If I check it, my data class types references are resolved but the Reference.cs is empty. Where can I begin to troubleshoot this?
Asked
Active
Viewed 90 times
1 Answers
0
I suggest you to use the svcutil.exe command line will help you to spot potential problems, possibly due to an empty Reference.cs due to ambiguous type issues.
You can try this method:
- Remove the problematic service reference.
- Click on the project name in Solution Explorer to highlight the project.
- Right click on the project reference.
- Near the top of the context list, click the Cleanup item.
- Add your service reference as usual.
Sometimes adding a WCF Service Reference generates an empty reference.cs

Lan Huang
- 613
- 2
- 5
-
I performed your steps and that worked in the Debug confirguration but when I switched to Release the Service reference failed on update. – Chuck Jan 17 '22 at 19:16
-
Is there a specific error message for an update failure? You can use the svcutil.exe command line to help you spot potential problems. https://stackoverflow.com/a/8749098/17218587 – Lan Huang Jan 18 '22 at 08:41
-
None other than missing SOAP references. What syntax of cmd line switches would I use for the svcutil.exe? – Chuck Jan 22 '22 at 18:07
-
Maybe you can check the link I provided to find the solution. – Lan Huang Jan 25 '22 at 08:20
-
Here is the error when I perform the update from VS2019. Severity Code Description Project File Line Suppression State Error Custom tool error: Failed to generate code for the service reference 'ReviewScannedCertificateWcfSvc'. Please check other error and warning messages for details. CertifitracWeb.Scanning C:\Users\csalerno.CSITGROUP0\Projects\CertifitracWeb 3.x\CertifitracWeb v3.x\CertifitracWeb.Scanning\Service References\ReviewScannedCertificateWcfSvc\Reference.svcmap 1 – Chuck Jan 29 '22 at 15:07
-
Here is the error when I perform the update from VS2019. Severity Code Description Project File Line Suppression State Error Custom tool error: Failed to generate code for the service reference 'ReviewScannedCertificateWcfSvc'. Please check other error and warning messages for details. MyAPPWeb.Scanning C:\Users\csalerno.CSITGROUP0\Projects\MyAPPWeb 3.x\My v3.x\MyAPPWeb.Scanning\Service References\ReviewScannedCertificateWcfSvc\Reference.svcmap 1 – Chuck Jan 29 '22 at 15:19
-
Here is the error when I use the cmd of svcutil /t:code http://MyAPPWeb.CSitGroup.Com/ReviewScannedCertificateWcfSvc.svc /d:"C:\Temp\test.txt" /r:"C:\Users\csalerno.CSITGROUP0\Projects\MyAPPWeb 3.x\MyAPPWeb v3.x\MyAPPWeb.Scanning\bin\Release\MyAPPWeb.Scanning.dll" --Continued – Chuck Jan 29 '22 at 15:24
-
--Continued Attempting to download metadata from 'http://MyAPPweb.csitgroup.com/ReviewScannedCertificateWcfSvc.svc' using WS-Metadata Exchange or DISCO. Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 4.8.3928.0] Copyright (c) Microsoft Corporation. All rights reserved. Error: Cannot obtain Metadata from http://MyAPPweb.csitgroup.com/ReviewScannedCertificateWcfSvc.svc Metadata contains a reference that cannot be resolved: 'http://MyAPPweb.csitgroup.com/ReviewScannedCertificateWcfSvc.svc'. -- Continued – Chuck Jan 29 '22 at 15:25
-
-- Continued There was no endpoint listening at http://MyAPPweb.csitgroup.com/ReviewScannedCertificateWcfSvc.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. The remote server returned an error: (404) Not Found. – Chuck Jan 29 '22 at 15:25
-
I think it may be a problem with the configuration file, find the marked endpoint, check the port in the address attribute, maybe the port number has changed, the configuration of
in the behavior. – Lan Huang Feb 03 '22 at 09:40 -
I have several web.conf's. The WCF Update operation in VS2019 works fine in under the Debug config but when I change to Release it fails. I'm also Transforming the Web.Config in managing the website URLs.. Any idea on where to look? – Chuck Feb 23 '22 at 14:21