Udostępnij za pośrednictwem


SDK samples WSDAPI StockQuote, FileService fail to build with msbuild if VS 2008 installed

The WSDAPI StockQuote and FileService samples that ship in the Windows SDK for Windows 7 may fail to build on the command line (using msbuild) if Visual Studio 2008 is installed. These samples include project files that reference WSDL and XSD files, and msbuild attempts to invoke sproxy.exe to process these files. Visual Studio 2008 does not include sproxy.exe, and compilation fails if the tool is not present. Compiling from inside the Visual Studio IDE is unaffected; the samples will compile without error.

A workaround is available.  It is not necessary to use sproxy to process these files.  WsdCodeGen, a WSDL/XSD compiler for WSDAPI, can be used to generate C++ code from these files. This generated code is already included in the sample.

If you encounter this error, you can remove the XSD and WSDL files from the affected project files and recompile with msbuild:

  • StockQuote\StockQuoteContract\StockQuoteContract.vcproj: remove StockQuote.xsd, StockQuote.wsdl, and StockQuoteService.wsdl
  • FileService\FileServiceContract\FileServiceContract.vcproj: remove FileService.wsdl