Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 550 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't install nuget package because of "Failed to initialize the PowerShell host"

#11
I had this issue with my Visual Studio 2015.
I uninstalled and re-installed NuGet Package Manager again.
It worked for me.
Reply

#12
This issue is not always related to the PowerShell Execution Policy. My machine is configured as "Unrestricted" for both PowerShell x64 and x86, but I still get this error message from times to times in Visual Studio 2013.

When I try to open the Package Manager Console:
> Windows PowerShell updated your execution policy successfully, but the
> setting is overridden by a policy defined at a more specific scope.
> Due to the override, your shell will retain its current effective
> execution policy of Unrestricted. Type "Get-ExecutionPolicy -List" to
> view your execution policy settings. For more information please see
> "Get-Help Set-ExecutionPolicy".

This is not a valid error message.

Rebooting Visual Studio does not always resolve the problem.

Running the process as an admin never resolves the problem.

Like Declan, the latest update of the Package Manager plugin fixed the issue: 2.8.60723.765
Reply

#13
This Nuget fix worked for me:

[To see links please register here]

Reply

#14
Setting an execution policy to RemoteSigned or Unrestricted should work. It must be changed under an administrator mode via a PowerShell console. Be aware that changes will be applied according to the bit version of the PowerShell console, so 32bit or 64 bit. So if you want to install a package in Visual Studio (32 bit version) which requires a specific policy you should change settings of the policy via PowerShell (x86).

The command in PowerShell (as administrator) to set the policy to unrestricted (as noted by @Gabriel in the comments) is:

start-job { Set-ExecutionPolicy Unrestricted } -RunAs32 | wait-job | Receive-Job

Having set the policy to unrestricted, you will want to set the policy back to its original after the install is complete.

Reply

#15
Had the same problem and this solved it for me (Powershell as admin):

Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy -Value ByPass
Reply

#16
After trying various suggested fixes, it was finally solved by updating the NuGet Package Manager extension in Visual Studio.

This is done under Tools -> Extensions And Updates, then in the Extensions and Updates dialog Updated -> Visual Studio Gallery. A restart of Visual Studio may be required.
Reply

#17
By default my Windows 10 64-bit only had Powershell version 1.0 enabled. I changed the control panel/Programs/Programs and features/Turn Windows features On Off.

Make sure the Windows Powershell 2.0 engine is enabled.

Restart VS2015 in non-administrator mode and with all packages installed correctly.
Reply

#18
Set the execution policy to Bypass instead of Unrestricted or RemoteSigned; [this tutorial gives fuller instructions](

[To see links please register here]

). Also, if you are having trouble using PowerShell to change the policy then the author shows you how to change it in Regedit.
Reply

#19
I had the same problem with vs2013 and changing execution policy did not fix it.
The only working solution I found was uninstalling Nuget from VS and installing it again. Steps are here:

[To see links please register here]

Reply

#20
If you use VS 2013 Update 5, you should manually install an [update 2.8.7](

[To see links please register here]

) for NuGet Packet Manager.

The [bug report](

[To see links please register here]

) has more details.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through