none
Problem with NuGet in Visual Studio RRS feed

  • Question

  • I just recently upgrade my laptop from Windows Vista to Windows 7 so that I can use Visual Studio 2012 on it.  I just attempted to create a new ASP.NET MVC 4 project, but it would not add some of the NuGet packages that come with it, specifically EntityFramework.  When attempting to install the package through the NuGet manager, I get the following error:

    Failed to initialize the PowerShell host. If your PowerShell execution policy is set to AllSigned, open the Package Manager Console to initialize the host first.

    Now, when I open the Package Manager Console, I get the following error from there:

    The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\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\System32\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\System32\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\System32\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\System32\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.

    The prompt never appears, so the Console is essentially unusable.

    Now, I have tried several possible remedies, but to no avail.  So, does anyone have any ideas as to how to resolve this issue?

    Thanks in advance!


    Christopher Reed

    "The oxen are slow, but the earth is patient."


    Wednesday, December 26, 2012 6:03 PM

All replies