Unable to cast object of type 'System.Management.Automation.PSCustomObject' to type 'System.Collections.IEnumerable'

落爺英雄遲暮 提交于 2019-12-11 07:15:29

问题


After installing Update 4 to Visual Studio 2012, when I try to add a controller right-clicking on the Controllers folder in the Solution Explorer and selecting "Add -> Controler" I am getting following exception:

Unable to cast object of type 'System.Management.Automation.PSCustomObject' to type 'System.Collections.IEnumerable'.

This is how Visual Studio is presenting the error:

This error is happening only for brand new projects, fortunately I am not getting this error in my projects that were in development.

Additional information: The MVC template that I choose was: "Basic", but I got the same problem for "Empty", "Internet Application" and "Intranet Application" templates as well.


回答1:


The solution was restart my PC and allow Windows 8.1 to install pending updates.



来源:https://stackoverflow.com/questions/20029199/unable-to-cast-object-of-type-system-management-automation-pscustomobject-to-t

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