This project is read-only.


get-package help missing command:parameterValue for ProjectName


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">
          <command:parameterValue required="true">string</command:parameterValue>
However, the -ProjectName parameter (~line 203) is missing that element:
        <command:parameter required="false" position="named">
Because of that, the "man get-package" section on syntax shows it as a switch parameter instead of one needing a value:
    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 5, 2013 at 12:30 AM by dotnetjunky


dotnetjunky wrote Mar 30, 2013 at 3:40 PM

would you care to send a pull request?