NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

nuget restore /verbosity INVALID_VALUE gives a bad error #8089

Open zippy1981 opened 5 years ago

zippy1981 commented 5 years ago

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):

NuGet version (4.9.3): OS version (i.e. win10 v17134):

Worked before? If so, with which NuGet version: No

Detailed repro steps so we can see the same problem

  1. open a comman line
  2. cd to someplace where nuget restore will work e.g a Visual Studio solution directory
  3. Type nuget restore /verbosity INVALID
  4. Get gthe folloing error:
Unknown option: '-Verbosity'
NuGet.CommandLine.CommandLineException: Unknown option: '-Verbosity'
   at NuGet.CommandLine.CommandLineParser.GetPartialOptionMatch[TVal](IEnumerable`1 source, Func`2 getDisplayName, Func`2 getAltName, String option, String value)
   at NuGet.CommandLine.CommandLineParser.AssignValue(Object command, PropertyInfo property, String option, Object value)
   at NuGet.CommandLine.CommandLineParser.ExtractOptions(ICommand command, IEnumerator`1 argsEnumerator)
   at NuGet.CommandLine.CommandLineParser.ParseCommandLine(IEnumerable`1 commandLineArgs)
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

Expect something like Invalid value for option '-Verbosity': 'INVALID' must be one of normal, quiet, detailed

Other suggested things

Verbose Logs

Obviously I can't here

Please include verbose logs (NuGet.exe -verbosity detailed | dotnet.exe --verbosity diag | etc...)

Sample Project

None provided

donnie-msft commented 5 years ago

dotnet.exe handles this more gracefully, but doesn't show usage info for verbosity.

dotnet restore --verbosity INVALID

Required argument missing for option: --verbosity Usage: dotnet restore [options]

mohammad68a commented 2 years ago

You can use dotnet restore SolutionName.sln --verbosity detailed Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal.