NuGet/Home

NuGet.exe suggests incorrect argument form "--force-evaluate" (should be "-ForceEvaluate") for NU1004

已關閉

#9,365 建立於 2020年3月31日

 (2 則留言) (4 個反應) (0 位負責人)HTML (292 個分叉)batch import
Area:LoggingFunctionality:RestoreIcebox cleanup candidatePriority:3Product:NuGet.exeStatus:Inactivehelp wanted

倉庫指標

星標
 (1,459 顆星)
PR 合併指標
 (平均合併 464天 23小時) (30 天內合併 1 個 PR)

描述

Looks like the help/error message is getting confused with the "dotnet restore" version of the argument.

Repro Steps

> nuget.exe restore

NU1004: The packages lock file is inconsistent with the project dependencies so restore can't be run in locked mode. Disable the RestoreLockedMode MSBuild property or pass an explicit --force-evaluate option to run restore to update the lock file.

Ok sure, let's try.

> nuget.exe restore  --force-evaluate
Unknown option: '--force-evaluate'
NuGet.Commands.CommandException: Unknown option: '--force-evaluate'
   at NuGet.CommandLine.CommandLineParser.GetPartialOptionMatch[TVal](IEnumerable`1 source, Func`2 getDisplayName, Func`2 getAltName, String option, String 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)

NuGet Version: 5.5.0 Platform: Windows 10 x64 10.0.17763.1098

貢獻者指南