NuGet.exe install error 9009 - Downloaded Git repo won't build - mono--runtime=v4.0.30319

怎甘沉沦 提交于 2019-12-12 01:53:10

问题


I'm not the most experienced programmer so please excuse any information that is irrelevant here. Better for me to put as much detail down as I can.

I'm working with a team solution in Visual Studio 2013 on windows, and just recently we had some issues to do with NuGet packages. Another member of my team solved the issue by reinstalling a package "Microsoft.AspNet.WebApi". I have now pulled the latest version and it won't build on my machine, although it does on my team members machine.

It shows the error:

"Error  1   The command "mono --runtime=v4.0.30319
(projectdirectory)\.nuget\NuGet.exe install "packages.config" -source ""   -                                                        
RequireConsent -solutionDir "(projectdirectory)"" exited with code 9009."

I have found semi-relevant posts about this and have checked the nuget.targets directory for the use of the solutionDir variable and in fact that whole file is up to date as per https://nuget.codeplex.com/SourceControl/latest#src/Build/NuGet.targets

I've also updated all NuGet packages and the packages.config file within the solution from both the package manager console and the manage NuGet packages window.

Does anybody understand why this 9009 error would be presenting/understand what is necessary to fix it?

Any help very much appreciated as more understanding of the area might help me to debug it also.

Thanks, JK


回答1:


Thanks for the replies, I seem to have solved the problem.

I had seen the post Jaco but it hadn't solved my issue. I found another error message on startup in the Package Manager Console which mentioned init.ps1 in the entity framework folder could not be loaded because execution of scripts was disabled. this turned out to be an issue with PowerShell which was fixed by going to the Powershell command prompt and executing the:

Set-executionPolicy Unrestricted -Scope CurrentUser

I had to use CurrentUser because of weird permissions on my machine which wouldn't let me do it universally.

I originally had build issues with Nuget packages not being present after this but they were errors I'd seen before and just involved reloading certain packages into the projects references.

Thanks for the replies, I only noticed the more meaningful error just now.




回答2:


There is an older post on this that might help with your problem:

nuget install exit code 9009

In short the error code 9009 is raised as Visual Studio can't find Nuget.exe.

Please let me know if this post doesn't resolve your problem.



来源:https://stackoverflow.com/questions/29168481/nuget-exe-install-error-9009-downloaded-git-repo-wont-build-mono-runtime-v

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!