omportamento estranho que chama o método wcf do powershell usando new-webproxyservice

Pode alguém me explicar isso:

riei um serviço wcf realmente simples para fins de test
Consumindo o serviço do powershell usando o New-WebServiceProxy, encontrei esse comportamento estranho:

se serviço wcf Eu tenho esse tipo de contrato retornando umint:

[OperationContract]
int GetDictionaryLength();

chamar este método no PowerShell gera um erro e a definição do método não é o que eu esperaria ver

PS C:\ps> $a | Get-Member getdictionarylength | fl *

TypeName: Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1_022s_pwdservice_svc_wsdl.PWDService

Name: GetDictionaryLength

MemberType: Method

Definition: System.Void GetDictionaryLength (System.Int32 &, mscorlib, Versão = 4.0.0.0, Cultura = neutra, PublicKeyToken = b77a5c561934e0

alterar o contrato assim:

[OperationContract]
string GetDictionaryLength();

faça um ótimo trabalho chamado powershel

Porque isso

WCF está em .net 4.0 O PowerShell é V2

questionAnswers(2)

yourAnswerToTheQuestion