When building my solution, I randomly receive one of these errors:
C:\working_directory.nuget\NuGet.targets(91, 5): Type handle 'NuGet.ProjectModel.LockFile' and method handle with declaring type 'NuGet.ProjectModel.HashCodeCombiner' are incompatible. Get RuntimeMethodHandle and declaring RuntimeTypeHandle off the same MethodBase. C:\working_directory.nuget\NuGet.targets(91, 5): error MSB3073: The command ""C:\working_directory.nuget\NuGet.exe" install "C:\working_directory\Project_A\packages.config" -source "https://www.nuget.org/api/v2/" -NonInteractive -RequireConsent -solutionDir "C:\working_directory\ "" exited with code 1.
C:\working_directory.nuget\NuGet.targets(91, 5): Common Language Runtime detected an invalid program. C:\working_directory.nuget\NuGet.targets(91, 5): error MSB3073: The command ""C:\working_directory.nuget\NuGet.exe" install "C:\working_directory\Project_B\packages.config" -source "https://www.nuget.org/api/v2/" -NonInteractive -RequireConsent -solutionDir "C:\working_directory\ "" exited with code 1. An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
C:\working_directory.nuget\NuGet.targets(91, 5): The signature is incorrect. C:\working_directory.nuget\NuGet.targets(91, 5): error MSB3073: The command ""C:\working_directory.nuget\NuGet.exe" install "C:\working_directory\Project_C\packages.config" -source "https://www.nuget.org/api/v2/" -NonInteractive -RequireConsent -solutionDir "C:\working_directory\ "" exited with code 1.
C:\working_directory.nuget\NuGet.targets(91, 5): Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'NuGet, Version=3.5.0.1938, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Index not found. (Exception from HRESULT: 0x80131124) --- System.BadImageFormatException: Index not found. (Exception from HRESULT: 0x80131124) C:\working_directory.nuget\NuGet.targets(91, 5): --- End of inner exception stack trace --- C:\working_directory.nuget\NuGet.targets(91, 5): error MSB3073: The command ""C:\working_directory.nuget\NuGet.exe" install "C:\working_directory\Project_A\packages.config" -source "https://www.nuget.org/api/v2/" -NonInteractive -RequireConsent -solutionDir "C:\working_directory\ "" exited with code 255.
C:\working_directory.nuget\NuGet.targets(91, 5): Abstract method with non-zero RVA. C:\working_directory.nuget\NuGet.targets(91, 5): error MSB3073: The command ""C:\working_directory.nuget\NuGet.exe" install "C:\working_directory\Project_D\packages.config" -source "https://www.nuget.org/api/v2/" -NonInteractive -RequireConsent -solutionDir "C:\working_directory\ "" exited with code 1.
This used to happen only on one machine, now another machine is seeing the same problem.
This issue is not persistent , I can successfully build my solution after rebuilding for a few times. I've also tried "Clean Solution" but it does not fix the issue.
I'm not sure what's wrong since the errors are random and not persistent :(
Can someone shed some light? I am using VS2015, another machine using VS2013 also experience the same issue now.
I have just run into this. In my case, it was a disk space issue. Check the free space on your C:\ ???
User contributions licensed under CC BY-SA 3.0