2
votes

I'm trying to build a web API project in visual studio 2013 which I've downloaded from git.

However, whenever I'm trying to build it is generating following error. Can anyone suggest any help to resolve this.

I'm using windows 8.1 with visual studio 2013 version 4.

Error Messages:

Error 1

This version of F:\WebApi\WebApi.nuget\NuGet.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

Error 2

The command ""F:\WebApi\WebApi.nuget\NuGet.exe" install "F:\WebApi\WebApi\src\Sum.WebApi\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "F:\WebApi-master\WebApi-master\ "" exited with code 216.

1
I think error is self explanatory, your version of windows doesn't match the version of windows required by the project.. Surely required versions might have been stated in project's docKavindu Dodanduwa
I'll guess you are using 32-bit Windows and the project contains the x64 Nuget binary. First, the Nuget folders shouldn't be included in version control, Visual Studio will restore the packages automatically. For now, just download the x86 version and copy it over the x64 versionPanagiotis Kanavos

1 Answers

0
votes

You should definitely remove the commited nuget.exe from Git that is causing the problems. Even better if you configure automatic package restore, which again involves removing the nuget.exe file:

https://docs.nuget.org/consume/package-restore/migrating-to-automatic-package-restore

According to the MSDN thread below, it could also be fixed by modifying the .gitattribute file:

https://social.msdn.microsoft.com/Forums/en-US/b79c39b9-75d4-4c09-a774-f76474429c83/nugetexe-is-not-compatible-with-the-version-of-windows-youre-running?forum=TFService

However, i would still recommend the automatic package restore approach.