I observe strange behavior of SvcUtils.exe.
If I pass there /reference parameter, it does not generate *.cs file for some reason.
C:\test>"C:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\SvcUtil.exe" /t:code http://localhost/Api/Common.svc /r:Api.dll
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.17929]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'http://localhost/Api/Common.svc' using WS-Metadata Exchange or DISCO.
Generating files...
C:\test\output.config
At the same time, if I remove the parameter, it generates it normally.
C:\test>"C:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\SvcUtil.exe" /t:code http://localhost/Api/Common.svc
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.17929]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'http://localhost/Api/Common.svc' using WS-Metadata Exchange or DISCO.
Generating files...
C:\test\CommonService.cs
C:\test\output.config
Why? How to get the classes from Api.dll that are used in Api.svc to be generated in CommonService.cs?
UPD. Let me add some details that seem to me obvious but nevertheless important. The Api.dll assemply includes classes marked with [DataContract] attribute with properties marked with [DataMember] attribute. These classes are returned from methods visible in Api.svc. My goal is to reuse the classes from Api.dll in generated proxy code.
Why I find this behavior strange? It generates proxy classes normally for services without reuse, but if I add /r parameter to reuse classes, it refuses to generate code at all. So the question is what is done wrong? What could be done wrong to get this behavior and how to do it right to achieve the goal?
UPD2. The most strange is that updating references from Visual Studio with checked "reuse" option works perfectly.