VS2012 中的 Nuget 崩溃

Nuget crash in VS2012

在 VS 2012(更新 5)中构建时 Nuget 崩溃,详细信息如下:

将不胜感激有关此问题的任何信息。 Nuget 版本 2.8.60318.667

VS2012报错:

Problem signature:
Problem Event Name: CLR20r3

Problem Signature 01:   NuGet.exe

Problem Signature 02:   4.6.2.5055

Problem Signature 03:   5abc2994

Problem Signature 04:   NuGet

Problem Signature 05:   4.6.2.5055

Problem Signature 06:   5abc2994

Problem Signature 07:   113a

Problem Signature 08:   1d

Problem Signature 09:   System.MissingMethodException

OS Version: 6.3.9600.2.0.0.256.4

Locale ID:  1033

Additional Information 1:   b7d6

Additional Information 2:   b7d6c2e5daaa8871798cc10ddd35970b

Additional Information 3:   5b5d

Additional Information 4:   5b5d296921c7f5f427d03f948377754e

错误描述:

Error 60 The command "".nuget\NuGet.exe" install "\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir " "" exited with code -532462766.

在输出选项卡中:

1>.nuget\NuGet.targets(100,9): error : Unhandled Exception: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.

1>.nuget\NuGet.targets(100,9): error : at NuGet.Common.CommandLineResponseFile.ParseArgsResponseFiles(String[] args, Int32 parseArgsResponseFileRecursionDepth)

1>.nuget\NuGet.targets(100,9): error : at NuGet.CommandLine.Program.Main(String[] args)

1>.nuget\NuGet.targets(100,9): error MSB3073: The command "".nuget\NuGet.exe" install "\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "\ "" exited with code -532462766. 2

问题已通过从 Nuget 4.6.2 降级到 Nuget 4.1.0 解决。不确定为什么首先会出现问题。