I have a simple WCF service application (based on this guide: Getting started ). My problem is that when I add a function to my application and want to regenerate the Proxy.cs file using the following command:
C:\kod>svcutil.exe /language:cs /out:Proxy.cs /config:app.config http://localhos t:8000/PBMB
I get the following result. The only solution I know for re-creating these files is to reboot my computer. But every time I change something, it is frustrating. Who can help?
Result:
Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, version 4.0.30319.1] Copyright (c) Microsoft Corporation. All rights reserved.
Trying to download metadata from ' http: // localhost: 8000 / PBMB ' using WS-Metad ata Exchange or DISCO. Error: Cannot import wsdl: portType Detail: an exception was thrown at startup WSDL import extension: System.Se rviceModel.Description.DataContractSerializerMessageContractImporter Error: The scheme with the target namespace ' http: // PBMB ' could not be found. XPath to Error Source: // wsdl: definitions [@targetNamespace = ' http: // PBMB '] / wsdl: p ortType [@ name = 'IService']
Error: cannot import wsdl: binding Detail: an import error occurred wsdl: portType, which wsdl: binding depends on. XPath to wsdl: portType: // wsdl: definitions [@targetNamespace = ' http: // PBMB '] / wsdl: portType [@ name = 'IService'] XPath for Error source: // wsdl: definitions [@targetNamespace = ' http://tempuri.org/ '] / WSDL: binding [@ name =' WSHttpBinding_IService ']
Error: Failed to import wsdl: port Detail: Import error wsdl: binding that wsdl: port depends on. XPath to wsdl: binding: // wsdl: definitions [@targetNamespace = ' http://tempuri.org/ '] / WSDL: binding [@ name = 'WSHttpBinding_IService'] XPath to Error Source: // wsdl: definitions [@ targetNamespace = ' http://tempuri.org/ '] / WSDL: service [@ name = 'PBMBService'] / WSDL: port [@ name = 'WSHttpBinding_IService']
File generation ... Warning: no code has been generated. If you tried to generate a client, this may be because the metadata documents do not contain valid contracts or services, or because all contracts / services were found to exist in / reference assemblies. Be sure to transfer all metadata to the tool.
A warning. If you want to create data contracts from schemas make sure to use the / dataContractOnly option.
Ichibann
source share