RestCode / WebApiProxy

MIT License
198 stars 91 forks source link

A parameter cannot be found that matches parameter name 'Wait'. #87

Open ghost opened 8 years ago

ghost commented 8 years ago

I'm getting this error:

PM> WebApiProxy-Generate-CSharp
Receive-Job : A parameter cannot be found that matches parameter name 'Wait'.
At C:\Users\...\packages\WebApiProxy.CSharp.1.0.5.35849\tools\WebApiProxyCSharp.psm1:30 char:48
+      $result = Receive-Job -Job $generateJob -Wait <<<< 
    + CategoryInfo          : InvalidArgument: (:) [Receive-Job], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.ReceiveJobCommand

I.m using:

faniereynders commented 8 years ago

@Atorres666 I haven't personally tested the PS script command from VS2013. Are you also having the same issue in VS2015?

ghost commented 8 years ago

No, I don't have VS2015, what version should work on VS2013? Where's the versions list? I may try older versions

ghost commented 8 years ago

I will try older versions

https://www.nuget.org/packages/WebApiProxy.CSharp/ https://www.nuget.org/packages/WebApiProxy/

ghost commented 8 years ago

I got it working with these old versions:

Server WebAPIProxy: 1.2.0.41997 Client WebApiProxy: 1.0.4.7731

I had to manually delete the dll references and the corresponding lines from packages.config and run install-package again in each project, otherwise more errors were thrown.

Thank you Fanie Reynders great work

vulcanik commented 8 years ago

Server WebAPIProxy: 1.2.0.41997 Client WebApiProxy: 1.0.4.7731

Working on VS2015 too, I confirm you that using last versions the problem persists on this environment (VS2015).

faniereynders commented 8 years ago

What version of Windows are you using?

vulcanik commented 8 years ago

Win 7 Professional (SP1)

2016-03-08 16:30 GMT+01:00 Fanie Reynders notifications@github.com:

What version of Windows are you using?

— Reply to this email directly or view it on GitHub https://github.com/faniereynders/WebApiProxy/issues/87#issuecomment-193824700 .

faniereynders commented 8 years ago

Would you mind testing it on Windows 8 or higher?

vulcanik commented 8 years ago

Hi, I tried with Windows 10 but I got an error:

<<Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 3.3.0.167

Type 'get-help NuGet' to see all available NuGet commands.

PM> WebApiProxy-Generate-CSharp Generating proxy code... Exception calling "Generate" with "0" argument(s): "One or more errors occurred."

Done. PM>

Basically updating only the server to the last version it works If I update also the client to the last stable version I got that error :(

Hope this can help.

2016-03-08 16:44 GMT+01:00 Fanie Reynders notifications@github.com:

Would you mind testing it on Windows 8 or higher?

— Reply to this email directly or view it on GitHub https://github.com/faniereynders/WebApiProxy/issues/87#issuecomment-193829376 .

ngm commented 8 years ago

This issue seems to be related to the version of Powershell installed on the machine. If you are on Windows 7, try installing the latest version of Powershell via https://www.microsoft.com/en-us/download/details.aspx?id=50395 .

lust4life commented 8 years ago

-wait is Introduced in Windows PowerShell 3.0.

https://msdn.microsoft.com/en-us/library/microsoft.powershell.core.activities.receivejob.wait(v=vs.85).aspx