2013-01-04 15 views
5

Po przeprowadzeniu aktualizacji w miejscu z systemu Windows 7 Pro do wersji 8 Pro, nie udało mi się uruchomić konsoli menedżera pakietów NuGet w programie Visual Studio 2012 Pro. Błąd, który otrzymuję, to:Konsola menedżera pakietów NuGet nie może załadować programu 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. 

Szukałem przez kilka ostatnich dni sposobów rozwiązania tego problemu, ale zostały one całkowicie puste. Próbowałem wszystkie z nich z bezskutecznie:

  • wyłączenie wszystkich Visual Studio dodać dodatki
  • Resetowanie wszystkich ustawień
  • Ponowna Visual Studio
  • Naprawa Visual Studio
  • Zaczynając PowerShell przed Visual Studio (czy to tylko oznacza uruchomienie PowerShell, a następnie uruchomienie Visual Studio?)
  • Uruchamianie programu PowerShell i programu Visual Studio jako administratora
  • Running Visual Studio w trybie awaryjnym
  • ustawienie mocy Shell ExecutionProperty do nieograniczonego

Visual Studio zostało wykazującą innych dziwnych zachowań, takich jak konsekwentnie upaść, starając się dodać zdarzenie click do XAML na konkretnej stronie, jak również, i z tego powodu moje jelito mówi, że to nie jest naprawdę Power Shell lub NuGet, ale problem z moim OS/Visual Studio.

O ile ktoś nie ma rozwiązania, myślę, że jestem po prostu robiąc czystą instalację systemu Windows 8 i mając nadzieję, że to naprawi.

Odpowiedz

4

znalazłem ten problem, który jest bardzo podobny do Ciebie:

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

można spróbować rozwiązania tej kwestii, aby sprawdzić, czy to rozwiązuje problem?

+0

Znalazłem tę metodę i wypróbowałem ją bez powodzenia. W końcu zrezygnowałem i po prostu wyczyściłem zainstalowany Win8, który naprawił to oczywiście. –

Powiązane problemy