2013-01-04 22 views
5

Dopo aver eseguito un aggiornamento sul posto da Windows 7 Pro a 8 Pro non è stato possibile eseguire la console del gestore pacchetti NuGet in Visual Studio 2012 Pro. L'errore che ricevo è:NuGet Package Manager Console Impossibile caricare 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. 

Ho cercato per gli ultimi giorni diversi modi per risolvere questo problema ma sono arrivato completamente vuoto. Ho provato tutti questi, senza alcun risultato:

  • Disabilitare tutti i Visual Studio add ons
  • Ripristino di tutte le impostazioni
  • Reinstallare Visual Studio
  • Riparazione Visual Studio
  • partire PowerShell prima di Visual Studio (non questo significa solo avviare PowerShell e quindi avviare Visual Studio?)
  • Esecuzione di PowerShell e Visual Studio come amministratore
  • Esecuzione di Visual Studio in modalità provvisoria
  • Impostazione Power Shell ExecutionProperty a restrizioni

Visual Studio è stato esibire altri comportamenti strani, come costantemente crash durante il tentativo di aggiungere un evento Click per XAML su una pagina specifica pure, e per questo motivo il mio istinto dice che in realtà non è Power Shell o NuGet ma un problema con il mio sistema operativo/Visual Studio.

A meno che qualcuno non disponga di una soluzione, penso di non fare altro che eseguire un'installazione pulita di Windows 8 e sperare che ciò risolva il problema.

risposta

4

ho trovato questo problema, che è molto simile al tuo:

Embedding Powershell v2.0 in .NET app on Windows 8 RTM

Potete provare la soluzione su tale questione per vedere se lo ripara?

+0

Ho trovato anche questo metodo e l'ho provato senza fortuna. Alla fine ho rinunciato e ho appena installato Win8 installato che ha risolto ovviamente. –

Problemi correlati