NuGet / Home

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

NuGet -version (4.5) gets mad #6618

Open shanselman opened 6 years ago

shanselman commented 6 years ago

NuGet should not freak out when I do a -v ersion check.

Details about Problem

C:\Users\scott>nuget --version
Unknown command: '--version'
NuGet.CommandLine.CommandLineException: Unknown command: '--version'
   at NuGet.CommandLine.CommandManager.GetCommand(String commandName)
   at NuGet.CommandLine.CommandLineParser.ParseCommandLine(IEnumerable`1 commandLineArgs)
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

C:\Users\scott>nuget -version
Unknown command: '-version'
NuGet.CommandLine.CommandLineException: Unknown command: '-version'
   at NuGet.CommandLine.CommandManager.GetCommand(String commandName)
   at NuGet.CommandLine.CommandLineParser.ParseCommandLine(IEnumerable`1 commandLineArgs)
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

C:\Users\scott>nuget -v
Unknown command: '-v'
NuGet.CommandLine.CommandLineException: Unknown command: '-v'
   at NuGet.CommandLine.CommandManager.GetCommand(String commandName)
   at NuGet.CommandLine.CommandLineParser.ParseCommandLine(IEnumerable`1 commandLineArgs)
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

Did something change in NuGet.exe 4.5?

nkolev92 commented 6 years ago

I don't think NuGet ever had a version command?

nuget.exe help

and

nuget.exe

should do the trick.

The stacktrace being logged on normal weirdness started in 4.3.

nkolev92 commented 1 year ago

Duplicate in https://github.com/NuGet/Home/issues/11434 which has more context.