This project has moved. For the latest updates, please go here.

ERROR: The "=" operator is missing after a named argument.

Oct 24, 2013 at 11:54 AM

I installed your package and built my project but I got the following error:

1> Building NuGet package in Post-Build event...
1> The "=" operator is missing after a named argument.
1> At C:\Projects\Test\PostBuildScripts\New-NuGetPackage.ps1:383 char:66
1> + function Get-NuSpecVersionNumber([parameter(Position=1,Mandatory) <<<< ][Vali
1> dateScript({Test-Path $_ -PathType Leaf})][string] $NuSpecFilePath)
1> + CategoryInfo : ParserError: (:) [], ParseException
1> + FullyQualifiedErrorId : MissingEqualsInNamedArgument

Any idea what might be wrong?

Thank You,
Oct 24, 2013 at 4:00 PM
I assume that you don't have at least PowerShell v3.0 installed. This script requires it at the moment. Can you please verify this by opening PowerShell console and typing $PSVersionTable.PSVersion and letting me know your version number. If you are still using PowerShell v2.0 or older, try updating it to PowerShell version 3.0 (can be done via optional Windows Updates).

I'll update the documentation on the site for now to say PS v3.0 is required and revisit the script. If I can make it v2.0 compatible fairly easily I will, otherwise I will put a PS version number check in there to make the problem obvious in the error message for future versions.

Oct 28, 2013 at 8:46 PM
I've just updated the script to v1.3.0 and it is now PowerShell v2.0 compatible, so if you try using it again now it should work.
Marked as answer by deadlydog on 2/2/2014 at 11:51 AM