开发者

NuGet: "Unable to load one or more of the requested types"

I installed NuGet into Visual Web Developer 2010 Express, but when I go to Solution Explorer, right-click on a project's "References" folder, and select "Add Library Package Reference", I immediately get this error:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

There's just an OK button, and no way for me to retrieve the additional information it's telling me about.

This is a fresh install of NuGet; I've never installed it on this computer befor开发者_StackOverflow中文版e.

How can I fix and/or diagnose this error so I can get NuGet to work?


It turns out this error occurs when PowerShell is not installed. In trying to further diagnose the problem, I went to Tools > Library Package Manager > Package Manager Console, and the console came up with red text that said:

Error: The Package Manager Console requires PowerShell 2.0 runtime, which is not detected on this machine. Please install the PowerShell 2.0 from http://support.microsoft.com/kb/968929 and restart Visual Studio.

After I installed PowerShell, the Add Library Package Reference dialog started working.

I've filed a bug report against NuGet, asking for a better error message when prerequisites are missing (and ideally for the installer to actually install the prerequisites): Item #530: "Unable to load one or more of the requested types" error

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜