Home: '-o' parameter no longer works

Created on 9 Apr 2018  路  3Comments  路  Source: NuGet/Home

Details about Problem

The -o parameter for setting the output directory no longer works with the 4.6.2 update.

  • NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): nuget.exe
  • NuGet version (x.x.x.xxx): 4.6.2
  • Worked before? If so, with which NuGet version: 4.5.x

Detailed repro steps so we can see the same problem

  • Run NuGet Pack with -o [folder] to set the output folder.
  • Observe the following error
 error : Ambiguous option 'o'. Possible values: OutputDirectory OutputFileNamesWithoutVersion.
Pack Icebox NuGet.exe

Most helpful comment

it can break in the future

Why even have the partial switch names at all then? This is a horrible horrible practice. Please don't break our builds.

All 3 comments

@dotMorten Thanks for reporting this issue.

The option -OutputFileNamesWithoutVersion was adding as part of this commit, which was first introduced in NuGet 4.6.x.

Please start using -OutputDirectory as a safe usage of the switch and the command. In general, if you you use partial switch names, then it can break in the future. But using full names for the switches will be safe.

it can break in the future

Why even have the partial switch names at all then? This is a horrible horrible practice. Please don't break our builds.

@dotMorten we had an internal discussion and are reopening this issue for consideration.

Was this page helpful?
0 / 5 - 0 ratings