2

Closed

get-package help missing command:parameterValue for ProjectName

description

http://nuget.codeplex.com/SourceControl/changeset/view/f53b1d017f2ca11281b3f4944d023f214450491b#src/VsConsole/PowerShellCmdlets/Help/NuGet.Cmdlets.dll-Help.xml

The -ProjectName parameter of Get-Package requires an argument - attempting to provide it without an argument fails:
PM> get-package -projectname
Get-Package : Missing an argument for parameter 'ProjectName'. Specify a parameter of type 'System.String' and try again.
Other parameters for Get-Package that require a string parameter include the necessary command:parameterValue element to say so - for instance, the -Source parameter (~line 193)
        <command:parameter required="true" position="named">
          <maml:name>Source</maml:name>
          <command:parameterValue required="true">string</command:parameterValue>
        </command:parameter>
However, the -ProjectName parameter (~line 203) is missing that element:
        <command:parameter required="false" position="named">
          <maml:name>ProjectName</maml:name>
        </command:parameter>
Because of that, the "man get-package" section on syntax shows it as a switch parameter instead of one needing a value:
SYNTAX
    Get-Package -Source <string> [-ListAvailable] [-Updates] [-ProjectName] [-Filter <string>] [-First <int>] [-Skip <int>] [-AllVersions] [-IncludePrerelease] [<CommonParameters>]
Thankfully, the fix should be just copy-pasting that command:parameterValue element from one of the other parameters (the Source parameter one would be fine) and inserting it. With the current contents of the file, it means inserting this line between the existing lines 204 and 205:
      <command:parameterValue required="true">string</command:parameterValue>
Closed Apr 4, 2013 at 11:30 PM by dotnetjunky
Fixed.

comments

dotnetjunky wrote Mar 30, 2013 at 2:40 PM

would you care to send a pull request?