I have simple WCF Service Application (based on this tutorial :Getting Started ). My problem is that when I add a function to my application and want to re-generate Proxy.cs file using command below:
C:\kod>svcutil.exe /language:cs /out:Proxy.cs /config:app.config http://localhos
t:8000/PBMB
I get following result. Only solution I know to re-generate those files is to reboot my computer. But doing so every time I change anything is frustrating. Anyone 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.
Attempting 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 while running a WSDL import extension: System.Se rviceModel.Description.DataContractSerializerMessageContractImporter Error: Schema with 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: There was an error importing a wsdl:portType that the wsdl:binding is de pendent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://PBMB']/wsdl: portType[@name='IService'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:binding[@name='WSHttpBinding_IService']
Error: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is depend ent 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']
Generating files... Warning: No code was generated. If you were trying to generate a client, this could be because the metadata docu ments did not contain any valid contracts or services or because all contracts/services were discovered to exist in /reference assembl ies. Verify that you passed all the metadata documents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.