2013-01-04 113 views
5

执行从Windows 7 Pro到8 Pro的就地升级之后,我一直无法使NuGet的程序包管理器控制台在Visual Studio 2012 Pro中运行。我收到的错误是:NuGet程序包管理器控制台无法加载PowerShell

The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2977) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. 
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2984) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. 
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2991) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. 
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2998) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. 
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3005) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. 
The term 'Get-ExecutionPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 

...我已经寻找过去几天的方式来解决这个问题,但已经快到了完全是空的。我已经尝试了所有的这些有没有效果:

  • 禁用所有Visual Studio附加功能
  • 重置所有设置
  • 重新安装Visual Studio中
  • 修复的Visual Studio
  • 的Visual Studio之前开始的PowerShell(不这只是意味着启动PowerShell,然后启动Visual Studio?)
  • 以管理员身份运行PowerShell和Visual Studio
  • 在运行Visual Studio在安全模式下
  • 设置电源外壳ExecutionProperty无限制

Visual Studio中已经表现出其他奇怪的行为,如持续崩溃,而试图添加Click事件的特定页面的XAML为好,正因为如此,我的直觉认为它不是Power Shell或NuGet,而是我的OS/Visual Studio的一个问题。

除非有人有解决方案,我想我只是做一个干净的Windows 8安装,并希望修复它。

回答

相关问题