I'm trying to build a Xamarin.iOS project in Xamarin Studio. Nuget packages restoration is enabled but during any build I get the following error:
/.nuget/NuGet.targets: Error: Command 'mono --runtime=v4.0.30319 "/.nuget/NuGet.exe" install "/ProjectName/packages.config" -source "" -RequireConsent -solutionDir "/" exited with code: 127. (ProjectName)
Running the same command from the terminal gives no issues and works absolutely fine with the following output message:
Restoring NuGet packages... To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
.nuget/NuGet.exe and .nuget/NuGet.targets are up to date. With the disabled nuget restore at the project .csproj file compilation works just fine.
Please advise.
Exit code: 127 = "command not found"
Does running that following cmd really work from the base solution directory?
mono --runtime=v4.0.30319 "/.nuget/NuGet.exe" install "/ProjectName/packages.config" -source "" -RequireConsent -solutionDir "/"
If you type which mono
is it found in /usr/local/bin
or /usr/bin
?
Try :
sudo ln /Library/Frameworks/Mono.framework/Commands/mono /usr/bin
And retry from Xamarin Studio.
Ref: https://forums.xamarin.com/discussion/43192/os-x-10-11-el-capitan-beta-and-xamarin-compiler-error-127
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With